Reply To: Not Overriding Default Search Results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Not Overriding Default Search Results Reply To: Not Overriding Default Search Results

#3205

adelaide
Participant

Hey Ernest,

I went through what you did, and it makes sense!

Like you recommended, I made a second search for the mega menu, so that when you hit enter or click, it will take the searcher to the search page. I copied the menu you helped me with exactly, except I changed the results on hitting enter or clicking the magnifying glass to go to the search page.

When I put it in the menu, a broken page loaded with this text:

string(2298) ” SELECT wp_v5z5qh_posts.post_title as title, wp_v5z5qh_posts.ID as id, wp_v5z5qh_posts.post_date as date, wp_v5z5qh_posts.post_content as content, wp_v5z5qh_posts.post_excerpt as excerpt, wp_v5z5qh_users.user_nicename as author, (0) as meta_matches, CONCAT('–', GROUP_CONCAT(DISTINCT wp_v5z5qh_terms.term_id SEPARATOR '—-'), '–') as ttid, wp_v5z5qh_posts.post_type as post_type, CASE WHEN wp_v5z5qh_ajaxsearchpro_priorities.priority IS NULL THEN 100 ELSE wp_v5z5qh_ajaxsearchpro_priorities.priority END AS priority, ((case when (lower(wp_v5z5qh_posts.post_title) REGEXP 'happy') then 3 else 0 end) + (case when (lower(wp_v5z5qh_posts.post_title) LIKE '%happy%') then 10 else 0 end) + (case when (lower(wp_v5z5qh_posts.post_title) REGEXP 'happy') then 10 else 0 end)) as relevance FROM wp_v5z5qh_posts LEFT JOIN wp_v5z5qh_postmeta ON wp_v5z5qh_postmeta.post_id = wp_v5z5qh_posts.ID LEFT JOIN wp_v5z5qh_ajaxsearchpro_priorities ON (wp_v5z5qh_ajaxsearchpro_priorities.post_id = wp_v5z5qh_posts.ID AND wp_v5z5qh_ajaxsearchpro_priorities.blog_id = 1) LEFT JOIN wp_v5z5qh_users ON wp_v5z5qh_users.ID = wp_v5z5qh_posts.post_author LEFT JOIN wp_v5z5qh_term_relationships ON wp_v5z5qh_posts.ID = wp_v5z5qh_term_relationships.object_id LEFT JOIN wp_v5z5qh_term_taxonomy ON wp_v5z5qh_term_taxonomy.term_taxonomy_id = wp_v5z5qh_term_relationships.term_taxonomy_id LEFT JOIN wp_v5z5qh_terms ON wp_v5z5qh_term_taxonomy.term_id = wp_v5z5qh_terms.term_id WHERE (wp_v5z5qh_posts.post_type REGEXP '[[:<:]]post[[:>:]]') AND (lower(wp_v5z5qh_posts.post_status) REGEXP 'publish') AND (( lower(wp_v5z5qh_posts.post_title) LIKE '%happy%' )) AND (wp_v5z5qh_posts.ID NOT IN (-55)) GROUP BY wp_v5z5qh_posts.ID HAVING (ttid REGEXP '–3–') ORDER BY priority DESC, relevance DESC, wp_v5z5qh_posts.post_date DESC LIMIT 10″ string(2298) ” SELECT wp_v5z5qh_posts.post_title as title, wp_v5z5qh_posts.ID as id, wp_v5z5qh_posts.post_date as date, wp_v5z5qh_posts.post_content as content, wp_v5z5qh_posts.post_excerpt as excerpt, wp_v5z5qh_users.user_nicename as author, (0) as meta_matches, CONCAT('–', GROUP_CONCAT(DISTINCT wp_v5z5qh_terms.term_id SEPARATOR '—-'), '–') as ttid, wp_v5z5qh_posts.post_type as post_type, CASE WHEN wp_v5z5qh_ajaxsearchpro_priorities.priority IS NULL THEN 100 ELSE wp_v5z5qh_ajaxsearchpro_priorities.priority END AS priority, ((case when (lower(wp_v5z5qh_posts.post_title) REGEXP 'happy') then 3 else 0 end) + (case when (lower(wp_v5z5qh_posts.post_title) LIKE '%happy%') then 10 else 0 end) + (case when (lower(wp_v5z5qh_posts.post_title) REGEXP 'happy') then 10 else 0 end)) as relevance FROM wp_v5z5qh_posts LEFT JOIN wp_v5z5qh_postmeta ON wp_v5z5qh_postmeta.post_id = wp_v5z5qh_posts.ID LEFT JOIN wp_v5z5qh_ajaxsearchpro_priorities ON (wp_v5z5qh_ajaxsearchpro_priorities.post_id = wp_v5z5qh_posts.ID AND wp_v5z5qh_ajaxsearchpro_priorities.blog_id = 1) LEFT JOIN wp_v5z5qh_users ON wp_v5z5qh_users.ID = wp_v5z5qh_posts.post_author LEFT JOIN wp_v5z5qh_term_relationships ON wp_v5z5qh_posts.ID = wp_v5z5qh_term_relationships.object_id LEFT JOIN wp_v5z5qh_term_taxonomy ON wp_v5z5qh_term_taxonomy.term_taxonomy_id = wp_v5z5qh_term_relationships.term_taxonomy_id LEFT JOIN wp_v5z5qh_terms ON wp_v5z5qh_term_taxonomy.term_id = wp_v5z5qh_terms.term_id WHERE (wp_v5z5qh_posts.post_type REGEXP '[[:<:]]post[[:>:]]') AND (lower(wp_v5z5qh_posts.post_status) REGEXP 'publish') AND (( lower(wp_v5z5qh_posts.post_title) LIKE '%happy%' )) AND (wp_v5z5qh_posts.ID NOT IN (-55)) GROUP BY wp_v5z5qh_posts.ID HAVING (ttid REGEXP '–3–') ORDER BY priority DESC, relevance DESC, wp_v5z5qh_posts.post_date DESC LIMIT 10″

I switched it back. You can see it if you go to widgets, and for the baby sign search menu change the search to Baby Sign Language 2. Then in the menu, the search is scrunched, has gray text, and is missing the header.

I am so sorry that I am really bad at this. I have no idea what I am doing wrong. It's embarrassing because I read the documentation three times!