Do not load megamenu on specific categories/pages

Posted in: Newspaper
Post count: 7

Hi team !

Is there a way not to load the megamenu on specific categories and pages ? I would like to keep the category links but not the article links in some specific categories and pages. We’re optimizing our SEO silos and I don’t want to spread the juice to non relevant articles from other categories.

Is it a hook we can unregister for this ?

Thanks in advance !

Post count: 22421

Hello,
The theme does not have any options for this. It will have to be hard-coded.
You can add conditions to this file:
http://screencast.com/t/KyNVTDsF
You can use these functions:
https://developer.wordpress.org/reference/functions/is_category/ and https://developer.wordpress.org/reference/functions/is_page/
Hope this helps.
Thanks.

Post count: 7

Hi there !

Thanks a lot. Exactly what I was looking for.

Cheers !

Post count: 7

Hi Bogdan,

Quick question. I still got the little arrow right to the category name. Do you know if we can get rid of it as quickly when we use this code ?

Post count: 22421

Hi,
The arrow can be removed with css like so:
.category-102 .menu-item-930 .td-icon-menu-down{
display:none!important;
}

For this you will need the category id (to target a specific category page) and the menu-item class (to target a particular menu-item) you can get with your browser inspector:
http://screencast.com/t/rFfkSBdLN and http://screencast.com/t/rhvnQihnK4R
Thanks.

Post count: 7

Hi, thanks for the answer.
Actually, I unloaded the menu completely on those specific pages/categories/postsfromcategory in header-menu.php : https://www.evernote.com/l/AEj8WTuYVFZB5K15X_6upm_16eYR7DocuAQ
Works perfectly.
Cheers !

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