• Resolved Doug

    (@nicoblog)


    Hi Lester, thanks for the great plugin!

    I am trying to do something and i’ve been trying without success for hours (not even kidding…)

    What i need to do is display $post_ratings_users and $post_ratings_average on a specific place in my theme single post. I just need those 2 numbers.

    I’ve tried creating shortcodes, setting them as global, and every solution i could find but i just can’t seem to do it.

    As a last resort i’m sending this message, believe me i tried everything so please if you have some time help me find a way to achieve it.

    I know it goes beyond the scope of the plugin but i ran out of options, my head hurts and no one knows the plugin better than you.

    Well, i hope you can help me with this and thank thank you.

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

    (@nicoblog)

    Forgot to mention the file i am working on is actually the header.php of my child theme and using %RATINGS_AVERAGE% displays literally that in text.

    Plugin Author Lester Chan

    (@gamerz)

    You have to use PHP code in your theme

    <?php echo get_post_meta( get_the_ID(), 'ratings_average', true ) ; ?>
    <?php echo get_post_meta( get_the_ID(), 'ratings_users', true ) ; ?>

    I am not sure whether it will work in header.php because it is meant to work within the WP loop only.

    Thread Starter Doug

    (@nicoblog)

    It’s working perfectly on header as well.
    Thanks so much Lester!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Help displaying score values on theme’ is closed to new replies.