Major BUG in PAGINATOIN functionality in CP 3.0.3
I have reported this before... (when 3.0.0 was released and the forum had a bug report topic..) I still see that it has not been fixed..
Consider the following normal use of CP:
1. lets say you have two categories "Cars" and "Boats"
2. you search for a word f.ex: "Toyota"
lets say that the system has 16 posts for "Toyota" in the "Cars" category and 0 posts in "Boats".
So, simply searching for "Toyota" across both categories correctly gives you two pages.
first page has 10 and the (pagenavi) next page has 6 (assuming 10 posts pr
3. Now lets say you search for "Toyota" and restrict the search to only search the "Boats" category - This should give you a "No posts found" message. But it DOES NOT.
Instead you will get an empty area where the posts normally are displayed with a PAGINATION showing that you have 2 pages of hits.
WHY THIS HAPPENS:
This happens because the filtering of what posts to display according to which category they belong (IE. you just want to search the "Boats" cat) happens in the page responsible to display the posts - search.php - while the cp_pagination() function in theme_functions.php gets the number of post from the global $wp_query object: $numposts = $wp_query->found_posts;
The problem is that this that the pagination function does not know that search.php later filter out posts that does not belong to a certain category and correctly believes that the number of posts that was returned from the database query is what we actually want to show.
This bug is really giving me a headache - I cannot sell a product with such a screaming error and I don't know how AppThemes can do it...
Hope to get some sort of response this time..