Hello,
I posted this question in the “Wordpress” forum. But someone said it’s better to ask this question in the PHP forum. So here it is:
I have Wordpress 3.1 installed with the official Wordpress “Twenty Ten” theme. Manual install from the direct code from wordpress.org. Nothing third-party or wizard-installed here. Straight from the source.
Under Settings>>Reading you can adjust this:
Blog pages show at most […] posts.
The problem is this: there is a dependency. The number of search results returned on a search results page matches the amount of most-recent posts displayed on the home page. This is an absurd dependency. Of course you want a lot of search results, but only a few recent posts on the home page. It’s so completely “duh” that I’m stunned the code is built this way.
I want the home page to show 4 results no matter what on earth happens. And then I want to set the search results to 15. If I go to Settings>>Reading and set the value to 15, then the home page will echo the 15 most recent posts onto the home pages. Talk about UGLY!!!
What exact files in the “Twenty Ten” theme or in Wordpress 3.1 do I surgically cut to decouple the home page post count from the search results echo count?
I don’t care about “keeping my code safe in case of a future update from Wordpress” or “maintaining compatibility with other themes”. I need to get this fixed now, in a can’t-miss kind of way, and in a way that is simple. The best solution for me (not anyone else) is the one that is simplest. The one that requires no understanding of PHP. Tell me what file to go in. Tell me what line to look for. Tell me what number to change, or what code to delete. I’ve got 99 to-dos, and learning PHP ain’t one.
Thanks.