Site logo

Archived topic

Off-canvas menu not showing when primary menu element is disabled.

8 replies · Started by Robert on February 21, 2023

Viewing posts 1–9 of 9

Hi,
I maybe trying to achieve something in a way that has some other much simpler solution! (I do that a lot I feel!)

Anyway, my website has two distinct areas a blog and a directory. In the blog area I have the primary menu for navigating to different aspects of the blog (guides, resources etc). This is set to become an Off-canvas menu on mobile menu.

I was then going to use the secondary menu for the directory area. I would then disable the primary menu in the Directory area.
The issue is when viewing on mobile.

Is it possible to have the secondary menu appear Off-Canvas in the same way as the primary menu does?

I also now realise that the secondary menu is not sticky like the primary.

Is this best solved with a light plugin? (do you know of any?)

Regards,
Rob

Hi Rob,

It's not possible to turn the Secondary menu into an Off canvas menu.

Can you refresh me on what you're trying to do? From what I remember, you're trying to remove the Menu for Desktop but keep it for mobile. Is that correct?

We'll assess what needs to be done afterward.

Hi Fernando,
Sorry for the confusion, I am trying lots of different things.

Ideally, I would have two menu's (one for blog and one for directory). Each menu would be sticky. When viewed on a mobile the menu's would become off-canvas.

I tried this by having primary for blog and secondary for the directory. That works on desktop as I can disable menu's.

However, that does not work on mobile.

I then decided to have a special Off-Canvas menu that combined the Blog and directory menu's when any page is viewed on mobile.
However, that does not work. On a directory page I disable the primary menu (so that only secondary appears on desktop) which also disables the off-canvas menu.

I wondered about a plugin as solving the off-canvas appearing on mobile is only a partial solution (ideal being two primary menus with different formatting etc)

My other consideration was adding buttons to the header. I already use a different header for the directory pages. The only problem with buttons is loosing all the cool features (sticky nav and off-canvas).

Thanks,
Rob

Hi there,

where can i see the Directory on the site ?

Hi,
Sorry, I forgot I dont have any links from the blog yet!
I have a link in the private area below.
(I have been trying a few things today and currently have buttons in the directory header and not using secondary menu.)

(I'm still trying to figure out how if sub-domain or sub-directory is better)

Some of the directory listings still have a sidebar as I am still trying to decide on a menu structure.

Thanks,
Rob

If you want different menus for different pages, we suggest using a plugin called Conditional Menus: https://wordpress.org/plugins/conditional-menus/

With this, you can just use the Primary Menu and activate the Off-canvas menu for mobile, and still have different menus per page.

Try using it first and see how it goes.

Thank you the plugin works great

You're welcome, Robert!

This archived topic is closed to new replies.