Hide sub categories in mega menu with css

Posted in: Newspaper
Post count: 101

Hi, we have a mega menu installed, but we only wish to display the first category, not all the subcategories
For instance as below, Film is set as mega menu, and we only wish to see Movies and Series, not new, dvd and so on.

Film
-Movies
– New
– DVD
-Series

Since this can’t be easily done in the code, I figured to do this via css.
Sadly, the id=”tdi_49_” can’t be used, since the id tends to jump on other pages, so the wrong categories are hidden or displayed.

Can this be done by using the data-td_filter_value=”433″ and how would I do this ?
Thanks.

Nieuws

Post count: 21065

Hello!

Add this CSS code in Newspaper -> Theme panel -> Custom code -> Custom CSS:

.tdb_header_mega_menu [data-td_filter_value="34647"], .tdb_header_mega_menu [data-td_filter_value="20"], .tdb_header_mega_menu [data-td_filter_value="23"]{
display: none!important;}

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.