WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
stars and text on the post and just the stars on the index (3 posts)

  1. oobby
    Member
    Posted 2 years ago #

    Hello

    I want to have the stars and text on the post and just the stars on the index is that possible?

    http://www.jeux-de-angry-birds.com/

    thanks

    http://wordpress.org/extend/plugins/wp-postratings/

  2. Oelita
    Member
    Posted 2 years ago #

    Hello,
    I searched for the same thing today, and I came to a solution :

    On the pages where I just want to have the stars for each post, and no vote allowed (archive page, for instance), I place the following code inside the post loop :
    if(function_exists('the_ratings')) { echo expand_ratings_template('<span class="rating">%RATINGS_IMAGES%</span>', get_the_ID()); }

    As you can see, the rating template is sent in argument, so you can replace my '<span class="rating">%RATINGS_IMAGES%</span>' with whatever you want as rating template.

    Of course, this rating template is written inside the code, and not managed in the admin page... and we call a function that is supposed to be internal to the plugin, but it works fine if you don't mind coding a little (and having, maybe, to change your code in a future version of this plugin).

  3. Escape Creative
    Member
    Posted 1 year ago #

    Oelita,

    Thank you so much. Your code for how to use the template variables works great. I searched for almost an hour to find out how to use them.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic