Not Overriding Default Search Results

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

This topic contains 19 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 9 months ago.

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #3194
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Yes exactly. If the category is excluded, then all the posts are eleminated in that category from the results. There is a setting to change that to every category instead of any category, that is what you need. I already switched that setting for you. (general options panel -> behavior -> terms logic -> OR)

    This results only showing posts from the excluded category 😉

    Yes it indeed slows down, because on the server side it actually does the opposite – it matches the posts to eleminate with the excluded categories. However it’s fixed as well with the upper mentioned option.

    It should return posts now from only the Baby Sign language category with much better speed.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #3196
    adelaide
    adelaide
    Participant

    Yayyyyyy!!! Thank you so much, Ernest! I don’t have to change anything so that it is just the baby sign category because I think it had more categories before?

    Thank you again for being so patient. I am so happy this is done.

    #3197
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    No problem 😉

    Nah, you don’t need to change anything right now. Everything from the baby sign language category will be included in the results.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #3205
    adelaide
    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!

    #3208
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sorry about that, that’s actually my fault. I forgot to switch back the debug mode and that’s why it printed out this information.

    I just turned it off, it should not be visible anymore.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 5 posts - 16 through 20 (of 20 total)

You must be logged in to reply to this topic.