I am trying to limit the maximum number of published posts for a custom post type. Lets say I want to limit the total to 50 posts, but not per user role.
I only want to limit published post, so I want to exclude drafts.
Do you guys have any idea how to achieve this?
Thanks in advance!
]]>I am wanting to limit the amount of posts on my homepage to 10 as I am having some major issues with loading speed of my site.
I have tried to alter it in Settings > Reading but it doesn’t work for my home page (it does work for any other page), no matter what number I put in the box. If I want to put a static page as my front page then that works. But as soon as I switch it to ‘Your Latest Posts’ it goes back to showing all of my posts on the homepage.
I have tried changing part of the php code in Editor as was suggested by one person on another similar discussion on this forum. I have also deactivated all of my plugins and still it doesn’t work, so I know it can’t be an issue with them.
Really desperate here and would appreciate any help/advice anyone can give me because I have run out of ideas!
Thanks
Hannah
]]>In the back end the original posts are still shown and you can access the post using the url, they are just no longer searchable or showing in the diary entries/calendar. For example all of February and March 12 have now disappeared from view.
I’m pretty sure this is tweakable by editing themes but having gone through the page throughly I can’t spot any code that relates to total number of posts visible.
Is there a plug-in that increase this?
Thanks
]]>An immediate question is how many is the maximum sensible number of entries? I would be immediately making (automatically!) nearly 300k posts, and would have to assume an (unlikely) possibility of another 200k. Each case would be one entry.
I am still in the very early stages and looking where to invest time in development.
Would this be too many?
I see that some search facilities suggest a limit of 100k posts.
]]><?php while ( have_posts() ) : the_post() ?>
<?php if ( !(in_category(’12’)))?>…
<?php endif; ?>
<?php endwhile ?>
This works fine to keep posts from that category from showing up, but wordpress still counts those posts it’s skipping over as part of the maximum 5 posts I’ve set. So if there are two posts from category 12 in the five most recent posts then only three posts are shown.
can someone help me fix this please?
]]>i have started a new blog, and on the home page it is listing all posts that have been posted so far[around 5]
i want only 2 to 3 only to be shown on the home page instead of all of them.
How do i make this change.
]]>