3

I've nearly finished a blog that I'm working on but the search feature isn't working quite correctly. Searches that should return more than one result only return one.

I guess I'm not really sure where to look to solve this issue as I'm not very experienced with Wordpress. The site is WP version 3.3.1 and uses search.php The template is a modified version of Wordfinder.

Any tips or suggestions would be greatly appreciated.

7
  • can you link to online blog?
    – Sagive
    Jan 23, 2012 at 21:06
  • If you run global $wp_query; var_dump( $wp_query ); what do you get? This may reveal some messed up query vars.
    – tollmanz
    Jan 24, 2012 at 4:40
  • I ran the query that you suggested. I searched for a term that should be fairly prevalent in my blog and it returned a bunch of posts that contain that word. So it seems like it's working the in the sense that it's finding the correct posts—it's just not displaying all of them when
    – Vecta
    Jan 24, 2012 at 17:57
  • 1
    Did you ever get this resolved? If so, it would be great to post your solution here for others. If not, I'm guessing that something else (a plugin or part of your theme) is intersecting the loop and cutting it short. The only thing odd that I could spot in your search.php file is wpe_excerpt. Also, just for giggles, have you viewed source and verified that your page is finishing (i.e. closing body and html tags)? If not, it could be a PHP fatal error. Feb 7, 2012 at 23:18
  • 1
    Sorry! I did figure it out and just forgot to come back here. That was exactly it. I removed the wpe_excerpt bit and it worked once again.
    – Vecta
    Feb 8, 2012 at 19:27

2 Answers 2

2

Here, wpe_excerpt is not defined so the page is erroring out.

0

Add an wp_reset_query() befor and after Loop, maybe it works. Works not, debug the query and see, what are in the array, all results or only one entry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.