Hide Vertical Tab Name

Hi Team,

Is it possible to hide a vertical from showing within the tabbed navigation bar? If you refer to the screenshot below I’m looking to remove “Jobs” from showing within the tabs both when you’re on universal or another vertical.

The screenshot is from my playground account, but the use case is I’m looking to build a new vertical for a client that can only be accessible via the URL. I’ll therefore hide the navigation when on that vertical and hide any results of that vertical from showing in universal (via CSS), but the final step is to hide the vertical name from the tabs.

Please let me know if this is possible!

Hi Scott,

This is possible by using the excluded verticals property. For every page you don’t want the jobs vertical to show, you can add the property to the top of your config.json file like this:

{
  "pageTitle": "Search",
  // "metaDescription": "", 
  // "canonicalUrl": "", 
  // "keywords": "", // The meta tag for keywords
  "excludedVerticals": ["jobs"],
  "componentSettings": { ... }
}
3 Likes

Hi Kristy,

Is this only supposed to hide the vertical name from the verticals in the nav bar at the top or should this also make sure that any results for that specific vertical don’t show as well?

Thank you!
Dana

Hi Dana,

This is only for hiding the vertical name in the nav bar. Since it’s done on the frontend, it won’t hide any results that will show up in universal search, which is controlled by the backend. However, since the vertical is hidden, you would need a direct link to get to that vertical search.

Let us know if you have any other questions for your specific use case!

Hi Kristy,
I’m working on something similar to Dana. I need to have a vertical created in the backend that is used for analytical and query suggestion purposes but I never want the vertical results to be included on the universal page (aka hidden from nav bar and results pages).
Is it possible to set that in the backend as you mentioned?

Thanks!

Hi Adrienne,

I’m curious to hear more about your use case. Do you want results to still surface on vertical search, just not universal? Or will there be no results anywhere and you just want query suggestions? What analytics are you looking at if there are no results?

Note that you can only use embedded prompts (that pull in fields from the KG data) in vertical search, so if you aren’t using vertical search, you can add hardcoded universal prompts without even adding the vertical.

Some ideas that come to mind to make this work (I haven’t tested them yet, so please let us know what works for you!):

  • If you don’t want results anywhere, you could add the vertical without setting any fields as searchable. Then there would be no way for results from that vertical to be returned.
  • If you do want results in vertical search, you could use query rules to remove searches from universal search. You may need to play around with a bit for your exact situation, but here are some ideas.
    • For the criteria, set searchTypes to UNIVERSAL and set either verticalKeys to the relevant vertical or use searchTermMatchesRegex with regex ".*" to capture all searches.
    • For the action, you could use return no results.

Hope this helps!