WordPress.org

Ready to get started?Download WordPress

Forums

GD Star Rating
Stars not showing in category pages excerpts (18 posts)

  1. hotmailpbpb
    Member
    Posted 2 years ago #

    I looked in this forum back 3 months and in Google back 3 years, But cannot find anyone with a similar problem.

    The stars rating don't show in category pages that show all posts as excerpts. Only for individual posts and in front page.

    I am using version 1.9.13 with the Atahualpa theme. I have not updated because it works otherwise quite good and don't want to break it. Also change log does not indicate this was addressed.

    In Star Settings for Articles, I have these "Auto insert rating code:" options checked "For individual posts" and "For posts displayed in Front page".

    In settings/categories I have set the star rating for the particular category page to
    articles: users

    Why is the star rating not showing?

    http://wordpress.org/extend/plugins/gd-star-rating/

  2. hotmailpbpb
    Member
    Posted 2 years ago #

    I updated to Version 1.9.15 and the star still does not appear. I have set it up to 1 star vote. Maybe I selected this setting but I cannot find where... anyone knows?

  3. templs
    Member
    Posted 2 years ago #

    Have the same problem (WP version 3.3).
    In Setting panel on Articles tab checked all this items:
    For posts displayed in Archives.
    For posts displayed on Front Page.
    For posts displayed on Search results.

    But ratings showing only on individual posts/pages. Here is example

  4. templs
    Member
    Posted 2 years ago #

    maybe there should be specific code in the theme?

  5. templs
    Member
    Posted 2 years ago #

    Hey, hotmailpbpb!
    Good news - you can try to fix it manually like me. Just place in archive.php of your theme this code:
    <?php if(function_exists('wp_gdsr_render_article')){ wp_gdsr_render_article(); } ?>
    Here is how that embedded in my code:

    ...
    <div>
    <?php the_excerpt('Read the rest of this entry &raquo;'); ?>
    <?php if(function_exists('wp_gdsr_render_article')){ wp_gdsr_render_article(); } ?>
    <p class="postmetadata">
    ...
  6. hotmailpbpb
    Member
    Posted 2 years ago #

    Thanks, templs!

    I found the "the_excerpt" function in a different php file because I guess it depends on the theme. I added your code and it works but unfortunately I am also using the Twitter Facebook share plugin and the star(s) don't appear after the excerpt but after the Twitter Facebook Share block and it looks weird.

    If you have any idea how to fix it so it appears before the "Read More" button, let me know. But I will look into it since I myself added that button but don't remember anymore how I did that.

  7. sgodar
    Member
    Posted 2 years ago #

    Hey Templs!

    Nice line of code! Question -- What if I ONLY want ratings to appear in posts that are in ONE category specifically?

    THANKS!

    ---Scott G.

  8. templs
    Member
    Posted 2 years ago #

    Hi Scott,
    Try is_category() function.
    For example:
    ...
    <div>
    <?php the_excerpt('Read more »'); ?>
    <?php
    if(function_exists('wp_gdsr_render_article')){
    if(is_category( array( 9, 'blue-cheese', 'Stinky Cheeses' ))){
    wp_gdsr_render_article();
    }
    }
    ?>
    <p class="postmetadata">
    ...

    For specifying list of categories you can use term_ID 9, or slug "blue-cheese", or name "Stinky Cheeses".

  9. sgodar
    Member
    Posted 2 years ago #

    Hey templs thank for the really quick response! I'm getting so frustrated!! Lol! does this go in my archive.php?

    THANKS!

  10. templs
    Member
    Posted 2 years ago #

    Right.
    Check it for archive.php first
    If it works try it for index.php, search.php and single.php if needed.

  11. Nafees BM
    Member
    Posted 2 years ago #

    Hey temples
    i have used this code in loop of index file so th I had it set up so it wound grab the rating from a specific post but it's grabbing the rating for the newest post every time.
    for ex:
    if (function_exists('wp_gdsr_render_article')) {
    wp_gdsr_render_article(858, false);
    }

    I am trying to get the rating function from post number 858 but it's using the newest post.""

  12. templs
    Member
    Posted 2 years ago #

    wp_gdsr_render_article - manual says: "This function call must be within the post loop."
    Spec for this function:

    wp_gdsr_render_article ($template_id=0, $read_only=false, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true)

    That means you've set template_id to 858 :)

    You can check functions descriptions on your site .../wp-content/plugins/gd-star-rating/info/legacy.html

    Try this function:

    wp_gdsr_show_article_rating ($post_id=0, $use_default=true, $size=20, $style="oxygen", $echo=true)

    Do you need only show rating?

  13. Nafees BM
    Member
    Posted 1 year ago #

    hay templs thnaks for your reply.
    yeh i need star rating on homepage. and someone has suggest me this code $post = 858;
    wp_gdsr_render_article($post_id);
    but it isn't working it giving following output
    http://www.badcreditloansapproved.com/wp-content/themes/enterprise/images/image.jpg

    and the code which you have given,where i would have to use this code? in index.php loop or post.php loop???

  14. Carcotas
    Member
    Posted 1 year ago #

    thanks for info ;) it worked to my website filmhd.ro

  15. Innovnate
    Member
    Posted 1 year ago #

    Is there a way to use this code to show multi ratings on every post on a category page? (not excerpts shown, full posts!)

    dev site: unitex.innovnate.com.au

    appreciate any help!

  16. Stranger
    Member
    Posted 1 year ago #

    hi folks,
    please help me on this problem,
    i have installed and setup this plugin and it is working properly, but i logout of my wp site than the ratings stars disappears and only text is displayyed like Rating: 5.0/5 (1 vote cast), i thought this problem is due to voting rules set to author/user only, i have set rule to Every one can vote but still facing same issue,
    i'm confused!
    my site: http://www.uwatchfree.com/

  17. simonstax
    Member
    Posted 1 year ago #

    Since installing Bullet Proof Security Pro on my wp site, GD Star Rating no longer works properly. Missing stars. I know this plugin messes heavily with the .htaccess file, but I am not confident enough to diagnose and fix.

    You can see this on one of my posts: http://www.simonstapleton.com/wordpress/2013/02/03/alternative-tactics-to-find-a-job-after-graduating/

    Has anyone else experienced this, or have an idea of how to fix it please?

  18. Doremdou
    Member
    Posted 1 year ago #

    hello simonstax, I see it is working again for you, how did you fix it please?
    I have the same problem, texts without stars...
    thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic