• Resolved neilfoster

    (@neilfoster)


    Beautiful. Works excellent.

    However, I cannot figure out why the following is occurring. Am I missing something or is it a “bug”?

    I am using this plugin as a widget on my footer area. I have the
    “Number of posts to show:” set to 6. On all the posts and pages, the plugin shows 6 posts as it should. However, when I view a category listing (query all posts in one particular category), the footer widget seems to ignore the “Number of posts to show:” setting and show all the posts.

    Anybody else have this issue?

    Thanks!

    URL: https://www.warrioressentials.life

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Martin Stehle

    (@hinjiriyo)

    Sorry, I could not find a reason for that. The widget always gets the maximum number of posts, regardless of any category setting.

    Thread Starter neilfoster

    (@neilfoster)

    Sorry, but your statement is a bit confusing.

    When you say the widget always gets maximum number of posts regardless of category setting, do you mean that it works for you and you don’t see why it happens to me, or it does not work for you and you don’t know why it’s happening?

    And by “maximum number”, do you mean “Number of posts to show:”?

    The only difference in the pages when it works and doesn’t work is in the URL structure.

    And today, without any changes, it is not even showing 6 (the chosen amount) on the footer as it did before. Sometimes it showing 4 and sometimes 5…

    Thread Starter neilfoster

    (@neilfoster)

    And perhaps, I am not clear. The categories I am speaking of is when I look at each website category, https://www.warrioressentials.life/category/how-to/

    by “regardless of category setting” do you mean this setting “Show posts of selected categories only?”

    If I leave it set to “All categories”, which is what I want, it still shows all posts, regardless to “Number of posts to show:” setting.

    Even if I change category setting to show only a particular category, it still shows all the posts in that category, not the “Number of posts to show:”

    This again is in the footer widget only as far as I can tell. Sidebar widget seems to work correctly.

    Thread Starter neilfoster

    (@neilfoster)

    further testing shows that the sidebar does not work correctly either if you choose to view the site categories…. widget shows ALL posts when viewing a page category whether in the footer or sidebar…

    hmmm… bummer

    Thread Starter neilfoster

    (@neilfoster)

    poop…. so I tried someones else’s plug-in. (sorry, I HAD to try)

    It does the exact same thing. Works great until I choose to view a particular category, then it shows ALL posts…

    WordPress code I suppose.

    Plugin Author Martin Stehle

    (@hinjiriyo)

    I answer your questions first:

    do you mean that it works for you and you don’t see why it happens to me, or it does not work for you and you don’t know why it’s happening?

    It works for me and when I wrote my answer I could not see why it does not work for you. But I got an idea, read on please..

    And by “maximum number”, do you mean “Number of posts to show:”?

    Yes.

    by “regardless of category setting” do you mean this setting “Show posts of selected categories only?”

    Yes.

    Now, there could be a reason: some plugin or the theme affects the function call of the recent posts (say “query” to it) and mess it up.

    Please search for the string widget_posts_args in the theme PHP files and in all PHP files in the plugin folder. If there is a match like add_filter( 'widget_posts_args', ... ); chances are high that you have found the perpetrator.

    Thread Starter neilfoster

    (@neilfoster)

    Excellent idea. Thanks. I will dig into it, but I think I’ve found a temp solution. I’ve taken the widget off the categories page. Not really necessary there, but I wanna see if I can figure it out still.

    Plugin Author Martin Stehle

    (@hinjiriyo)

    So, any new insights? If all is ok I will mark that case as resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Number of posts to show…’ is closed to new replies.