• Resolved hectorsuper

    (@hectorsuper)


    Hello,

    We have a custom post type, let’s call it “Widgets” – we have tens of thousands of them.

    Each “widget” has a number of custom fields (through ACF) for example “speed, size, quality, etc”.

    Is there a way either through the GUI or through hooks/actions to display a review based on that data?

    Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author MyThemeShop

    (@mythemeshop)

    Hello,

    WP Review provides a shortcode to display the review box. You can wrap it in an if statement to see if it satisfies your conditions.

    
    <?php
    if ( $should_display_review ) {
        echo do_shortcode( '[wp-review]' );
    }
    ?>
    

    If you want to populate the wp-review-related post meta, you can use the get_post_metadata filter. You can see the meta keys we’ve used in the wp_review_user_rating() function in includes/functions.php

    Hope that helps.

    Thread Starter hectorsuper

    (@hectorsuper)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Populate programatically?’ is closed to new replies.