pagination breaks wp_query->is_search
-
We’re using a child theme derived from twentyfourteen, but you can recreate this issue using the twentyfourteen theme as well, so it’s not as though our changes caused this issue.
When you search for all pages and posts containing the word “the”, you should get several pages of results which are nicely paginated for you via the twentyfourteen_paging_nav() function call in search.php .
Unfortunately on the first page of results the global wp_query->is_search() returns false. As soon as you page through your search results, you get is_search() returning true again, as expected
We’ve tried hacking the global wp_query->is_search=true in search.php before and after the call to twentyfourteen_page_nav() to no avail. This is my first WordPress forum post. Hoping someone else out there has had the same problem and been able to hack their way around it.
Thanks in advance for your anticipated patience and co-operation.
- The topic ‘pagination breaks wp_query->is_search’ is closed to new replies.