• Resolved jammylad

    (@jammylad)


    Hi,
    Is it possible to add reviews to custom posts (wp-adverts)? The shortcode doesn’t render at the moment.
    Adding the code below renders ok, however there’s no id assigned to it… so it shows the same info on each wpadverts listing.

    if(shortcode_exists( 'site_reviews_summary' )) {
    echo do_shortcode ( '[site_reviews_summary schema=true]' );

    And the following code taken from the helper section doesn’t display.

    glsr_get_review( $post_id );

    If I could just somehow get the shortcode to render, I could add manually to each listing.

    Any ideas?

    Many Thanks!

    • This topic was modified 6 years, 3 months ago by jammylad.

    The page I need help with: [log in to see the link]

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

    (@geminilabs)

    1. Use the assign_to and assigned_to shortcode options. Please read the “Site Reviews > Get Help > Documentation > Shortcodes” page for more information on the available shortcode options and what they do.

    if( shortcode_exists( 'site_reviews_summary' )) {
        echo do_shortcode( '[site_reviews_summary assigned_to=post_id schema=true]' );
    }
    if( shortcode_exists( 'site_reviews' )) {
        echo do_shortcode( '[site_reviews assigned_to=post_id]' );
    }
    if( shortcode_exists( 'site_reviews_form' )) {
        echo do_shortcode( '[site_reviews_form assign_to=post_id]' );
    }

    2. This only works if you are providing the WordPress post->ID of an existing submitted review.

    $review = glsr_get_review( $post_id );

    Use the glsr_debug function to print it to the screen:

    glsr_debug( glsr_get_review( $post_id ));

    • This reply was modified 6 years, 3 months ago by Gemini Labs.
    • This reply was modified 6 years, 3 months ago by Gemini Labs.
    • This reply was modified 6 years, 3 months ago by Gemini Labs.
    Plugin Author Gemini Labs

    (@geminilabs)

    @jammylad I have not heard back from you in over a week so I am marking this topic as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display reviews on custom posts’ is closed to new replies.