WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
RATINGS_SCORE (7 posts)

  1. lisster
    Member
    Posted 1 year ago #

    Hello,

    On the main page I show only RATINGS_IMAGES_VOTE, but
    in the subpage I want show %RATINGS_IMAGES_VOTE% %RATINGS_SCORE%
    How I can do it?
    Edit this: <?php the_ratings(); ?> ?

  2. Escape Creative
    Member
    Posted 1 year ago #

    lisster,

    Did you ever figure this out? I'm trying to figure out how to edit the display of the voting system. I see all the template variables, but I just don't know the syntax to use, or where to put the variables.

    Any help is appreciated.

    Thanks,
    Dave

  3. Escape Creative
    Member
    Posted 1 year ago #

    lisster,

    I found a support topic that has the answer:

    http://wordpress.org/support/topic/plugin-wp-postratings-stars-and-text-on-the-post-and-just-the-stars-on-the-index?replies=3

    It looks like this:

    <?php if(function_exists('the_ratings')) { echo expand_ratings_template('<span class="rating">%RATINGS_IMAGES%</span> <strong>%RATINGS_USERS% votes</strong>', get_the_ID()); } ?>

    You can see a full list of the template variables (the things inside the % sign) in the WP admin section, Ratings > Ratings Templates.

  4. lisster
    Member
    Posted 1 year ago #

    It works! Thanks a lot :)

  5. MaxTrix
    Member
    Posted 11 months ago #

    Does anybody knows how to make to call this with a shortcode?

  6. akinadebowale
    Member
    Posted 11 months ago #

    Thanks Escape Creative - works perfectly.

    MaxTrix - the templates/variable options are global for the [ratings] shortcode via the options page. If you are fine with using a global setup for the templates then edit the Ratings Template options and use the shortcode [ratings] on your page/post. But if you want different templates/variables for different pages/posts and don't want to dabble into PHP/template files, CSS might be the best option. Wrap template variables with custom classes and and show/hide across your various pages/posts via the CSS "display" property.

  7. MaxTrix
    Member
    Posted 11 months ago #

    I figured that out already, at the bottom I show the full template and on top I put it in a div and set a font size 0px :) And that works fine.

    However thanks for your answer!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.