• Hello!

    I am currently in the development stages of creating a WordPress site for my company. However, I decided to create a subsite after I had already installed and worked on the website. So, I had to install a plugin in order to have different menu options on my main website, and the subsite. The plugin allows me to show and hide certain menu options for different pages. Pretty cool.

    But, whenever I use the “search bar” and the search results appear, all of the menu options appear at the top, and it looks really sloppy. Is there any code that I can insert that will allow me to hide some of the menu options on any search result?

    The search results page can be seen here.

    https://franchisesociety.com/?s=Franchising

    The main site can be found at: https://www.franchisesociety.com
    The “Sub-Site” can be found at: https://www.franchisesociety.com/isof2017

    Thanks ahead of time!

Viewing 1 replies (of 1 total)
  • Hello babussell2,

    You can hide menu by css from search result page.
    Navigate theme customization from Dashboard >> Apperance >> Customize. Then click to Additional CSS option and put below css code into textarea then click on Save & Publish button.


    body.search-results #main_menu #menu-item-760,
    body.search-results #main_menu #menu-item-741,
    body.search-results #main_menu #menu-item-739,
    body.search-results #main_menu #menu-item-717,
    body.search-results #main_menu #menu-item-720,
    body.search-results #main_menu #menu-item-718 {
    display:none;
    }

    If there is no Additional CSS option then put below css code into your current theme’s style.css file located at wp-content/themes/your_current_theme/ folder.

    Note : All Changes you done in any file of theme are gone when you update theme. So prefer Child Theme.

    Hope this will helps you.

Viewing 1 replies (of 1 total)
  • The topic ‘Hiding Certain Menu Items on Search Results’ is closed to new replies.