Custom Menu Based On Categories

Posted in: Newspaper
Post count: 17

Hi,

We are looking to use custom menu based on post’s category. If a post falls under “A” category then the theme should use “A” menu, same applies for event calendar custom posts. Please advise.

Post count: 6535

Hi

This is a very complex task which require lots of customizations and tests in order to be achieved. Unfortunately we cannot offer custom work at the moment. We would have gladly made it for you but we are a small team and we are working very hard on the development, updates, fixes and support. If you really need this and you’re not aware of the steps that must be taken in this regard my advice is to look for a developer who can help you with implementation.

Thanks for your understanding!

Post count: 17

Hi, tried following options from another post:

Hello Eddy,

The method Alin provided works as expected. You simply have to use the is_category condition correctly
Try it like this: http://screencast.com/t/QqdhTCLIi
result:
homepage: http://screencast.com/t/edzeGXCUS4Gj
gadgets category: http://screencast.com/t/WomZDAB0kd

Thanks!

Its working fine with category archive pages but not with posts. Let me know if we can use some other method for posts.

Thanks in advance.

Post count: 22421

Hi,
You will have to change the code you mentioned. You can see there is a condition called is_category in the code. You will have to add is_single to it if you want to target posts as well. Here is a function reference: https://developer.wordpress.org/reference/functions/is_single/
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.