[wp-hackers] Search plugin and problem with paged searches in WP
2.1
Ryan Boren
ryan at boren.nu
Mon Feb 19 19:49:39 GMT 2007
On 2/19/07, Alex Günsche <ag.ml2007 at zirona.com> wrote:
> I'm totally stuck and I would really apprechiate if somebody had an idea
> on what I would have to change or where I have to search in order to get
> the paged comments working in WP 2.1 again. The relevant parts for the
> query construction are in the function ctas_queryfilter, ll. 375-501,
> the actual query is in ll. 465-497. I'm thankful for any hint; if
> something isn't clear, I'll be glad to answer any questions.
Your query needs to have SQL_CALC_FOUND_ROWS at the beginning. That
does the counting. Also, don't check for a post_status of static
anymore. Check for a post_type of 'page' to get pages and 'post' to
get posts. post_date_gmt <= current time is no longer needed to
exclude future posts. Future posts now have a post_status of
'future'.
Ryan
More information about the wp-hackers
mailing list