Back to GD Rating System (Lite) Forum

homepage / posts display

Published on: December 13, 2019 at 10:36 am · By: jayto
Author
Topic
#62558

is there an easy way to put stars on my homepage, where all the blog posts are listed? in excerpt or entry meta or even under post title? then will it work to rate individual posts on home without user viewing the actual posts?

Viewing 6 replies - 1 through 6 (of 6 total)
Author
Replies
  • #62559

    Hi,

    The only way to do it is by integrating a plugin display function into the theme template where you want it to show. Problem with non-single post/pages is that themes usually show excerpts, and the excerpts are stripped of HTML, making the auto embedding impossible for most themes. Check out this video: https://support.dev4press.com/kb/article/manual-rating-block-theme-integration/ and there are many more articles in the knowledge base with examples.

    Milan

    Dev4Press - Premium plugins for WordPress.

    1 user thanked author for this post.
  • #62561

    Very nice, you’re an excellent person! I am getting it to work. I am using Ajax Load More plugin repeater templates that display the posts with separate code. I have figured out that I need to put this code in the theme as video described AND the repeater template (because it’s not using default theme to call post display). It was very easy to troubleshoot, other than that, your video guide is perfect. Thanks.

  • #62562

    I have the stars showing though the Ajax Load More plugin repeater template, they display rating correctly on front page. Something blocking from actually making a vote from homepage though. Im using:

    <?php echo gdrts_posts_render_rating(array(
    ‘id’ => get_the_ID(),
    ‘name’ => ‘post’,
    ‘method’ => ‘stars-rating’
    ), array(
    ));
    ?>

    Exactly that in both my theme content.php + Ajax Load More repeater template (php + html allowed).

    Plugin settings:
    Dynamic Load ajax disabled.
    Display on ALL post types (first had ‘posts only’ setting, so I changed to ‘ALL’ could be problem…not seemingly…’posts only’ is ideal, but I think can remove instances via CSS on the few pages.

    My theme is very basic one, “Webpoint”.

    Something stopping from from allowing to vote on home page. :/ I will keep watching video to figure out in meantime.

  • #62564

    The AJAX loading is a problem, because plugin uses JavaScript for voting, and that JS is run when page is loaded. If you load things using AJAX, plugin’s own JS code has already finished, and the AJAX loaded ratings are not processed. Now, there is a way to trigger processing again, but that only works in the Pro version of the rating plugin: https://support.dev4press.com/kb/article/support-for-ajax-loading/. I plan to have this added to Lite plugin version, but I have no exact date when that will happen. Lite version will get a huge update at one point after major 4.0 Pro is released to backport some of the major updates that 4.0 will get.

    Milan

    Dev4Press - Premium plugins for WordPress.

    1 user thanked author for this post.
  • #62571

    Thanks again. Think this will help you? It’s for the ajax load more plugin specifically but it talks about REST API and loading JS in repeater template. Im going to look at it now, thought maybe it would be a helpful template for you for all kind of code, LMK!

  • #62575

    My plugin doesn’t use REST API to load content, and the in Pro version it has own method for the AJAX based loading initialization, that will be ported to Lite in next major update.

    Dev4Press - Premium plugins for WordPress.

    1 user thanked author for this post.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘homepage / posts display’ is closed to new replies.