WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] Problem with LIMIT and RANGE (13 posts)

  1. mchiaro
    Member
    Posted 1 year ago #

    [wpp header="From the last 7 days..." limit=5 range="weekly" order_by="views" post_type=post

    LIMIT does not seem to work properly on a RANGE of "weekly" and "monthly". In the above section of code, I have the limit set to 5 yet only four posts are being displayed on my page.

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi mchiaro,

    Are you comparing the results on your page with those on the stats? If so, there's a little something I need to "fix": the stats show post_type post,page, so results will be different from those shown by the shortcode if you change post_type to something else than post,page (default value).

  3. mchiaro
    Member
    Posted 1 year ago #

    I'm referring to what I see displayed on my public website. I have the limit set to 5 in the shortcode, so I expect 5 posts to be displayed (public site) yet only 4 are being displayed. The limit option in the shortcode does not seem to work properly.

    I understand that results will be different on the stats page.

  4. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Ah, that. Here, from Settings > WordPress Popular Posts > FAQ:

    limit: Sets the maximum number of popular posts to be shown on the listing.

    That means the plugin will display up to X posts that meet the criteria set by the user. If more than X posts are found, the plugin will only display X entries. On the other hand, if less than X results are found, the plugin will just display what was found and not X posts.

    Hope that clarifies thing a bit for you.

  5. mchiaro
    Member
    Posted 1 year ago #

    I think I understand the functionality, but it doesn't seem to be working. It did before the update, but isn't now....unless I have something odd in my shortcode.

    Currently I have the limit set to 5 but only 3 posts are being displayed. If I set the limit to 3, now only 2 posts are being displayed. That doesn't make sense. If three posts are returned when the limit is set to 5, I would expect three posts to also be returned when the limit is set to 3. Right?

  6. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    You're right about that. Mmm. Will look into it, though for me it seems to be working fine (I'm using the widget).

  7. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    mchiaro, please try this version of the plugin and let me know if it fixes the problem.

    Thank you in advance for your help!

  8. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    mchiaro, I just pushed a new update of the WPP plugin (2.3.4). It should fix the problem you described (and a few others as well).

    Please post your feedback here once you update.

  9. mchiaro
    Member
    Posted 1 year ago #

    Thanks for the update. That seemed to resolve the LIMIT issue!

    However, one other issue has now presented itself. When using excerpt_format=1 any link code in the excerpt seems to blow apart the formatting. I'm assuming it has something to do with the quotes in the link tag. I changed excerpt_format to 0 which is fine for me, but just wanted to bring this other item to your attention.

    Thanks for the work!

  10. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Awesome, glad to know that it worked :)

    About the excerpt messing with HTML tags, will look into it as soon as I get some spare time - probably this weekend as I'm busy at the moment with work projects. I just added this to my TODO list, thanks for the notice!

    Since the original topic was about limit & range issues, I-'m marking this as resolved.

  11. danahendrickson
    Member
    Posted 9 months ago #

    Hello Hector.

    This looks like it fits my needs very well!

    Two questions:

    1. Can a user select the timeframe for the posts that are displayed, i.e, view the top 10 for the past week, then past month, etc.?

    2. Are the number of votes displayed along with each post title?

    Thank you.

    Dana

  12. Héctor Cabrera
    Member
    Plugin Author

    Posted 9 months ago #

    Hi Dana,

    You're being off-topic here since your questions are totally unrelated to this topic.

    Anyways:

    1. Not possible yet. This feature has been requested before, will make it once I get some spare time.

    2. With "votes" I assume you're talking about WP-PostsRatings? If so, then the answer is yes - as long as that plugin is installed and enabled on your blog.

  13. danahendrickson
    Member
    Posted 3 months ago #

    Hi Hector:

    I must have misunderstood the original topic as I thought my initial question WAS related.

    Anyways, a belated thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.