Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Remove sidebar menu items from search results
- This topic has 5 replies, 2 voices, and was last updated 9 years, 5 months ago by
Ernest Marcinko.
-
AuthorPosts
-
December 19, 2016 at 7:49 pm #11305
lsumarkb
ParticipantI 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!
December 20, 2016 at 2:09 pm #11319Ernest Marcinko
KeymasterHi,
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
December 20, 2016 at 4:09 pm #11320lsumarkb
ParticipantHi 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?
December 20, 2016 at 4:19 pm #11321Ernest Marcinko
KeymasterHi!
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.
December 20, 2016 at 4:26 pm #11322lsumarkb
ParticipantOk…that worked. Thanks Ernest!! I appreciate how awesome your support is!
December 20, 2016 at 4:29 pm #11323Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- The topic ‘Remove sidebar menu items from search results’ is closed to new replies.