• Resolved edit7279

    (@edit7279)


    First off, great plugin!

    Is there a way to display multiple posts ratings on a single page?

    I’m guessing this snippet of code will display a single posts rating <?php echo do_shortcode(‘[ratings id=”1″]’); ?> on another page.

    However, I’m needing to display multiple ratings on a single page.

    On our site, people can rate a single post like usual (in our case a post is a business listing).

    However, we have another page that displays all of the posts (business listings) on a single page.

    I’m simply trying to display the rating next to each business on that single page, without the ability to rate on that single directory page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter edit7279

    (@edit7279)

    UPDATE

    Okay, so the below snippet of code sort of does what I’m trying to do.

    echo do_shortcode(‘[ratings id=”2485″ results=”true”]’);

    However, that obviously just displays the rating for a single post. How would I display the associated ratings for all of the posts on the page?

    I’m guessing this may need to be custom coded, since all of the posts on the page are rendered using ($business=$post2->ID;) and not their individual post IDs.

    • This reply was modified 8 years, 2 months ago by edit7279.
    Thread Starter edit7279

    (@edit7279)

    Getting closer…

    The below code displays the associated posts rating now, but how would I show the actual stars?

    echo get_post_meta( $business=$post2->ID, ‘ratings_score’, true );

    Thanks

    • This reply was modified 8 years, 2 months ago by edit7279.
    Thread Starter edit7279

    (@edit7279)

    RESOLVED

    echo the_ratings_results($business=$post2->ID, $post_ratings_users, $post_ratings_score, $post_ratings_average);

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display Multiple Ratings on Single Page’ is closed to new replies.