This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Remove sidebar menu items from search results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Remove sidebar menu items from search results

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11305
    lsumarkblsumarkb
    Participant

    I would like to remove the sidebar menu on our project pages from the search results. I am using the search to display staff members. We also list the staff members from each office in a sidebar menu. Search results are pulling up each staff member because when we search a last name, that last name is listed in the side bar menu. Thanks for the help!

    #11319
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    I’ve looked at how the page layout is generated, and I see you are using the Divi page builder to display that sidebar. The problem is, that in this case it becomes the part of the post content, and it’s indexed as well.

    The only solution is to switch back to the regular engine on the <span class=”code”>General Options -> Sources</span> panel: http://i.imgur.com/c9k7j0d.png

    #11320
    lsumarkblsumarkb
    Participant

    Hi Ernest,

    Thanks for your quick reply. If I switch back to the regular engine, can you explain how that would change the search to not include that sidebar?

    #11321
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    You should not notice too many differences (except the irrelevant results disappearing). In your case it will make it more precise.

    When using the regular engine, the shortcodes and filters are not executed and indexed, it simply searches the posts database table as it is. I’m guessing that the Divi builder is using a filter or a shortcode to create a widgetized area, and does not store the actual widget contents in the post content, in the database.

    In other words, the index table engine is used to get the words from the final output (visual output) as it’s represented on the front-end, while the regular engine simply searches the “raw” data within the wordpress posts database table. The raw post content and the visual post content are different – as the visual content is already post-processed. Because the regular engine searches the unfiltered (unprocessed) data, the contents from the widget are not there yet.

    #11322
    lsumarkblsumarkb
    Participant

    Ok…that worked. Thanks Ernest!! I appreciate how awesome your support is!

    #11323
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Remove sidebar menu items from search results’ is closed to new replies.