Support » Plugin: Rate My Post - Star Rating Plugin by FeedbackWP » Adding rating to tags. is it possible?

  • Hello,

    I have a problem that I have enabled ‘Show ratings on archive pages'(https://ibb.co/g9tVSP9) but still I can’t rate my tags (rating stars do not appear below tag description).
    screenshot: https://ibb.co/WcPLpn8

    Is it possible to rate tags?

    • This topic was modified 4 years, 9 months ago by Jugma.
    • This topic was modified 4 years, 9 months ago by Jugma.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hi @jugma,

    only post types (posts, pages, custom post types etc.) can be rated because ratings are saved to post meta. Archive pages such as tags and categories can’t be rated. The feature you enabled, should show post ratings (results) on archive pages – next to the title of each post.

    Regards,
    Blaz

    Thread Starter Jugma

    (@jugma)

    Hi @blazk,

    found some workaround to this.
    added below code to achives.php and now scoring appeared for every tag.

    <?php echo do_shortcode(‘[ratemypost]’); ?>
    <?php echo do_shortcode(‘[ratemypost-result]’); ?>

    however, now I have the same score for all the tags, meaning that if somebody will score one tag all of them will have the same score present.

    Plugin Support Blaz K.

    (@blazk)

    @jugma, in the scenario you are mentioning above you are simply rating the latest post in the tag archive. If you call get_the_ID() in archive page, WordPress returns the id of the latest post in that archive. The plugin was designed for rating posts (which consist of posts, custom post types and pages) and therefore it’s unfortunately not possible to rate an archive page. Note that votes and ratings are saved in post meta which does not exist for archives. So, such a feature would require a very big redesign of the plugin.

    PS: I’m curious – how come you need rating widget on archive pages? Archives are typically just lists of posts and there is not much to rate there? 🙂

    Regards,
    Blaz

    Thread Starter Jugma

    (@jugma)

    @blazk ok but I need that rating only that it would give me rich google text result. (stars in google search) I think now i will have it when have the code like this even if it showing rating for latest post.

    And why also i am doing it is that I have one page website so wanted to create more pages easily so thought that it would be the best and fastest way to create additional pages which are not related to any other pages. Each tag page refers to different keyword. Just my SEO strategy.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding rating to tags. is it possible?’ is closed to new replies.