Unable to Change How Many Posts Displayed by Query Loop
-
This problem is specifically occurring when I try to edit the “All Archives” template. If I have “inherit query from template” toggled on, I am unable to edit the number of posts displayed by the query loop. If I toggle “inherit query from template” off, then I can edit the number of posts displayed but then all my category links break and do not display the correct posts assigned to the category. My current theme is “Carnation.”
The blog I need help with is: (visible only to logged in users)
-
Hi there, out of curiosity what are you trying to change specifically? I see that currently the max number shown is 6. You are trying to show more or less posts by default? Here is an example of the All Archives template in action, showing the posts under the Gardening tag.
https://southeasternnativeplants.com/tag/gardening
If I toggle “inherit query from template” off, then I can edit the number of posts displayed but then all my category links break and do not display the correct posts assigned to the category
I’m not sure that I’ve understood this. Are you able to share a screenshot that clarifies what you are seeing? Can you make this change to your template temporarily so we can see it in action?
-

So strangely enough, now that you’ve mentioned you see 6 posts displayed, I went to my site and am also now seeing 6 posts displayed. I had changed the number of posts displayed in the website settings before posting this thread so I guess the change was just delayed in showing on my website. The original frustration I was having, was as you can see in this screenshot, the fact that in the ribbon toolbar to edit the query loop, there was no option to change the number of posts displayed (the symbol with two lines and a dot on each line). I was only able to get that symbol to pop up if I toggled off the “inherit query from template” option on the right, which then made my category links not work correctly.
-
Hi again,
The original frustration I was having, was as you can see in this screenshot, the fact that in the ribbon toolbar to edit the query loop, there was no option to change the number of posts displayed (the symbol with two lines and a dot on each line). I was only able to get that symbol to pop up if I toggled off the “inherit query from template” option on the right, which then made my category links not work correctly
To clarify, when you have the Inherit query from template option enabled, your content will be displayed using the default options and stylings for your theme. This will also mean that you can set the number of posts displayed (for all Query Loops that are set to inherit their settings) can be changed centrally here: https://wordpress.com/settings/reading/
This gives you the flexibility to setup many different query loops if you wish, and if down the road you wish to change the number of posts that display you can do that in one place instead of having to edit each one. For any specific Query Loop where you want to override this, you can turn off the option to inherit settings, and set specific settings for that block apart from the others.
Hope that helps. Please let us know if you have any more questions.
-
- The topic ‘Unable to Change How Many Posts Displayed by Query Loop’ is closed to new replies.