Review Post Shortcode

Closed
REHub - Price Comparison, Affiliate Marketing, Multi Vendor Store, Community Theme REHub - Price Comparison, Affiliate Marketing, Multi Vendor Store, Community Theme December 30, 2020
Login to reply
Vik Palan
3 years ago

ok

Igor Sunz Support Agent
3 years ago

it makes correct retrieving. woobox type is for woocommerce and not for
posts

Vik Palan
3 years ago

not exactly correct, this is not for woocommerce, this is for the review post. see the following function, it's retrieving data from meta key - review_post, not from _review_post_pros_text

from wp-content/themes/rehub-theme/functions/affiliate_functions.php

Line 694


function rh_review_frontend_fields($current_values, $form_id){

            $currentReview = get_post_meta( $current_values['post_id'], 'review_post' );
            $currentReviewscore = (get_post_meta( $current_values['post_id'], 'rehub_review_overall_score', true ) !='') ? get_post_meta( $current_values['post_id'], 'rehub_review_overall_score', true ) * 10 : 0;

        if (!empty($currentReview)){
            $review_heading = $currentReview[0][0]['review_post_heading'];
            $review_summary = $currentReview[0][0]['review_post_summary_text'];
            $review_proses = $currentReview[0][0]['review_post_pros_text'];
            $review_conses = $currentReview[0][0]['review_post_cons_text'];                    
        }
Igor Sunz Support Agent
3 years ago

code is correct. You have no these fields because you have no Woocommerce product with editor's  review and criteria

Vik Palan
3 years ago

Hi there

There is an issue from your shortcode - wpsm_reviewbox.

wp-content/themes/rehub-theme/shortcodes/shortcodes.php

Line 5493


        $thecriteria = get_post_meta((int)$id, '_review_post_criteria', true);
        $pros = get_post_meta((int)$id, '_review_post_pros_text', true);
        $cons = get_post_meta((int)$id, '_review_post_cons_text', true);

----------------------------------------------

From your codes, the function is trying to use meta key - _review_post_criteria, _review_post_pros_text and _review_post_cons_text to retrieve data however there are no such keys in database.  After check deeply, I think  your are saving all review's data with meta key - review_post



Best  Regards


Igor Sunz Support Agent
3 years ago

Please send details what you tried, where, how

Please, create topic according to guidelines, with all information, links,
screenshots. This will allow us to understand your issue and give you a
better and fast answer.

https://sizamtheme.support-hub.io/articles/how-to-write-to-support-if-you-need-technical-help

Vik Palan
3 years ago

Oh i have seen this help article and tried all variations but dit not work 

https://www.offerhub.ca/internet/distributel-reviews-the-best-internet-plans-currently-offered-in-canada/

This is Blog Post not a regular post. 

Vik Palan
3 years ago

This is a review Blog post  https://www.offerhub.ca/internet/distributel-reviews-the-best-internet-plans-currently-offered-in-canada/


I have added reviews with criteria if you see them at the bottom of the post. 


Is there a shortcode i could use to display this just the review/criteria on any other page?

If yes could you show an example of the shortcode, I have tried different variants using the support doc but it doesn't work. 

Additional Info

Link on page with issue: https://www.offerhub.ca/internet/distributel-reviews-the-best-internet-plans-currently-offered-in-canada/