I use a WordPress plugin 'List category posts' to show a category wise list of articles on a single page. What problem I am facing is I can see only 14 posts for every category. I am assuming that the archive page set to exhibit 14 articles is a hindrance in pulling. Even by using the Shortcode [catlist id=66201 numberposts=50] or other numbers the page display only 14 posts. With [catlist name=microsoft-edge post_type="post" numberposts=500] the same returns. I have got tired of trying googling and searching for a solution and implementing codes; kindly help me out.
-
Is anyone here?– SK21Nov 8, 2020 at 22:28
-
Skimming the plugin it looks like it just passes the numberposts number into WP_Query as posts_per_page. I'd check your plugins and theme for anything that might be setting a value for posts_per_page, e.g. in a pre_get_posts hook. I'd probably also check exactly what SQL WordPress is running for the category page, e.g. using the Query Monitor plugin, or a database profiler, to see if the 14 is actually there in the SQL or not. But it must be coming from somewhere outside this plugin, e.g. another plugin or your theme.– RupNov 8, 2020 at 22:59
-
But there isn't the same volume of people here as there is on StackOverflow, and we're not experts in this plugin. I see you've raised this as an issue on the plugin's GitHub too, which is the right thing to do. But I'd guess this is something else in your site that's adding the limit, not the plugin. Do you see a 14 item limit on any other pages?– RupNov 8, 2020 at 23:10
-
Yes, on the Archive pages of the site, 14 posts are being illustrated. One thing I should add here - When I add a function for the listing it also pulls the same number of items (14).– SK21Nov 8, 2020 at 23:22
-
I have already raised my voice on Github today and am waiting for an answer.– SK21Nov 8, 2020 at 23:24
1 Answer
It might be because of pagination. Check you /wp-admin settings.
Also, try to set numberposts=-1
.
Source: https://github.com/picandocodigo/List-Category-Posts/wiki/More-parameters-you-can-use
numberposts - Number of posts to return. Set to 0 to use the max number of posts per page. Set to -1 to remove the limit. Ex: [catlist name=mycategory numberposts=10] You can set the default number of posts globally on the options page on your Dashboard in Settings / List Category Posts.
-
Thanks for the answer, Poluhovich. I have checked all the settings and options in the plugin. Pagination could create the issue, yes. I also think so. When I enabled pagination it showed all the posts in the paginated view. But I need to put all the posts simply in a single page. What should I do in this case?– SK21Nov 8, 2020 at 22:45
-
Did you try to set numberposts=-1 as I mentioned in the comment above? Nov 9, 2020 at 23:27
-