No Results when inside loop
-
Hi.
Im not getting any results when using post loop in search.phpPastebin: https://pastebin.com/jUj3aHX7
When I remove the loop Relevanssi returns search result, but still lists 0 found from get_search_query().
query_vars shows:
array(71) { ["s"]=> string(8) "products" ["meta_query"]=> array(3) { [0]=> array(3) { ["key"]=> string(17) "_wp_page_template" ["value"]=> string(18) "page-thank_you.php" ["compare"]=> string(2) "!=" } [1]=> array(3) { ["key"]=> string(17) "_wp_page_template" ["value"]=> string(19) "page-template-2.php" ["compare"]=> string(2) "!=" } [2]=> array(3) { ["key"]=> string(17) "_wp_page_template" ["value"]=> string(19) "page-template-3.php" ["compare"]=> string(2) "!=" } } ["error"]=> string(0) "" ["m"]=> string(0) "" ["p"]=> int(0) ["post_parent"]=> string(0) "" ["subpost"]=> string(0) "" ["subpost_id"]=> string(0) "" ["attachment"]=> string(0) "" ["attachment_id"]=> int(0) ["name"]=> string(0) "" ["static"]=> string(0) "" ["pagename"]=> string(0) "" ["page_id"]=> int(0) ["second"]=> string(0) "" ["minute"]=> string(0) "" ["hour"]=> string(0) "" ["day"]=> int(0) ["monthnum"]=> int(0) ["year"]=> int(0) ["w"]=> int(0) ["category_name"]=> string(0) "" ["tag"]=> string(0) "" ["cat"]=> string(0) "" ["tag_id"]=> string(0) "" ["author"]=> string(0) "" ["author_name"]=> string(0) "" ["feed"]=> string(0) "" ["tb"]=> string(0) "" ["paged"]=> int(0) ["meta_key"]=> string(0) "" ["meta_value"]=> string(0) "" ["preview"]=> string(0) "" ["sentence"]=> string(0) "" ["title"]=> string(0) "" ["fields"]=> string(0) "" ["menu_order"]=> string(0) "" ["embed"]=> string(0) "" ["category__in"]=> array(0) { } ["category__not_in"]=> array(0) { } ["category__and"]=> array(0) { } ["post__in"]=> array(0) { } ["post__not_in"]=> array(0) { } ["post_name__in"]=> array(0) { } ["tag__in"]=> array(0) { } ["tag__not_in"]=> array(0) { } ["tag__and"]=> array(0) { } ["tag_slug__in"]=> array(0) { } ["tag_slug__and"]=> array(0) { } ["post_parent__in"]=> array(0) { } ["post_parent__not_in"]=> array(0) { } ["author__in"]=> array(0) { } ["author__not_in"]=> array(0) { } ["tax_query"]=> array(1) { [0]=> array(4) { ["taxonomy"]=> string(8) "language" ["field"]=> string(16) "term_taxonomy_id" ["terms"]=> int(127) ["operator"]=> string(2) "IN" } } ["ignore_sticky_posts"]=> bool(false) ["suppress_filters"]=> bool(false) ["cache_results"]=> bool(true) ["update_post_term_cache"]=> bool(true) ["lazy_load_term_meta"]=> bool(true) ["update_post_meta_cache"]=> bool(true) ["post_type"]=> string(3) "any" ["posts_per_page"]=> int(10) ["nopaging"]=> bool(false) ["comments_per_page"]=> string(2) "50" ["no_found_rows"]=> bool(false) ["search_terms_count"]=> int(1) ["search_terms"]=> array(1) { [0]=> string(8) "products" } ["search_orderby_title"]=> array(1) { [0]=> string(167) "wp_posts.post_title LIKE '{8f0e15daef86e6a7891cc9f1751d12fbf67afe964d2d2dc71d5034da843e721c}products{8f0e15daef86e6a7891cc9f1751d12fbf67afe964d2d2dc71d5034da843e721c}'" } ["taxonomy"]=> string(8) "language" ["term_id"]=> int(127) ["order"]=> string(4) "DESC" }
The topic ‘No Results when inside loop’ is closed to new replies.