Support » Plugin: WordPress Popular Posts » Dont display comments count

  • Resolved zydarek

    (@zydarek)


    When i use shortcode then dont display comments count, but when i use widget everything is ok, any ideas why?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Héctor Cabrera

    (@hcabrera)

    Hi @zydarek,

    Hard to say what’s going on with so little details. Please share more info so I can help you out.

    Thread Starter zydarek

    (@zydarek)

    @hcabrera can you look here:

    https://interdesign.pl/projekty/cakeroom/galeria/

    I user shortcode and post “slonik” have 2 comments (you can check when you go inside post) but on post grid is display 0 komentarzy (comments).

    • This reply was modified 1 month, 2 weeks ago by zydarek.
    Plugin Author Héctor Cabrera

    (@hcabrera)

    Share your shortcode too, please 😛 The URL alone doesn’t tell me much.

    Thread Starter zydarek

    (@zydarek)

    @hcabrera :
    [wpp range='last7days' post_type='post' thumbnail_width=300 thumbnail_height=400 wpp_start='<ul class="wpp-grid">' post_html='<li>{thumb}{title}<i class="far fa-comments"></i> komentarzy: {comments} <i class="far fa-eye"></i> wyświetleń {views}</li>']

    Plugin Author Héctor Cabrera

    (@hcabrera)

    Try removing the post_html parameter, save changes and check again.

    Ignore, see below.

    Plugin Author Héctor Cabrera

    (@hcabrera)

    Update: you need to use the stats_comments parameter in the shortcode for it to display the comments count. From the documentation:

    {comments} (returns comments count only, no text, requires stats_comments=1)

    So your shortcode should look like this now:

    [wpp range='last7days' stats_comments=1 post_type='post' thumbnail_width=300 thumbnail_height=400 wpp_start='<ul class="wpp-grid">' post_html='<li>{thumb}{title}<i class="far fa-comments"></i> komentarzy: {comments} <i class="far fa-eye"></i> wyświetleń {views}</li>']

    Note that the shortcode will only display the total number of comments received within the specified time range. In your case it’s just one comment, your “Bardzo fajny” comment was published on February 21st – exactly 8 days ago today.

    Thread Starter zydarek

    (@zydarek)

    @hcabrera

    I would like to get a functionality similar to this page:

    https://cakesdecor.com/cakes

    Where posts are displayed in 3 columns grid, the title, photo, author with an avatar, the number of views, the number of hearts (favorittes), and the number of comments. I would also like similar information to be displayed inside the post.

    Also i need sorting the grid, e.g. most frequently displayed from the last 3 days, from the last week, from the month, most commented and the newest posts?

    @hcabrera can you help me with prepare that template for your module?

    Regards, Adrian

    Plugin Author Héctor Cabrera

    (@hcabrera)

    While what you described is perfectly doable these kind of requests are unfortunately outside the scope of support I provide here: answering questions about the functionality of the plugin itself, feature requests, and bug reports.

    You may want to consider hiring a developer so they can help you implement all of these changes to your website if you don’t have the time and/or the skills to do it yourself.

    Since you didn’t mention anything about the comments count issue you were having before I take it that my previous observation helped you fix it and so I’m marking this topic as resolved now. Please feel free to ask any other questions you may have (although if these are not somehow related to the original topic please open a new thread instead.)

    Thread Starter zydarek

    (@zydarek)

    @hcabrera Maybe you would be interested in this assignment, of course I will pay for it.

    Plugin Author Héctor Cabrera

    (@hcabrera)

    Unfortunately the WordPress Forum Guidelines explicitly forbid discussing these kind of topics here, see Do Not Offer to Pay for Help and Do Not Offer to Work For Hire (hence my previous remark.)

    Thread Starter zydarek

    (@zydarek)

    @hcabrera i’ve got almost everything 🙂 Last two things

    Note that the shortcode will only display the total number of comments received within the specified time range.

    -it’s possible to modify this to show comments count from all days (just all the comments from a post)

    Its possible to sort posts by date (newest)?

    • This reply was modified 1 month, 2 weeks ago by zydarek.
    • This reply was modified 1 month, 2 weeks ago by zydarek.
    Thread Starter zydarek

    (@zydarek)

    @hcabrera I using also your plugin WP-PostRatings its possible to use in shortcode sorting by most rating?

    Plugin Author Héctor Cabrera

    (@hcabrera)

    it’s possible to modify this to show comments count from all days (just all the comments from a post)

    Yep, but this requires a bit of work: you could register a new custom Content Tag (like this for example) that returns the value of the get_comments_number() function (sounds complicated but it’s not, trust me, follow these instructions and you should be able to get it working, if not feel free to ask any questions you may have.)

    Its possible to sort posts by date (newest)?

    Nope. For this one you’ll need to use a different plugin, like Recently for example.

    I using also your plugin WP-PostRatings its possible to use in shortcode sorting by most rating?

    WP-PostRatings isn’t my plugin 😛 It’s Lester Chan’s!

    And no, WPP can’t sort posts by rating. Maybe one day.

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.