Two menu rows, both on mobile in the burger container

Hi, in need for two menu-rows in the header, used that post for that occasion: https://theme.co/apex/forums/topic/adding-a-menu-to-topbar/

So far so good, now when switching to mobile both menus are logically supposed to go into the mobile menu container, showing only up when clicking the burger.

How is that possible? Not stuck to the topbar, so any other solution that works works.

Overwritten x_output_primary_navigation-function in the child theme for now, adding a parameter to add the topbar menu. Now the Topbar-menu gets show on desktop and mobile.

As the concerning function gets called in wp-content/themes/x/framework/legacy/cranium/headers/views/global/_nav-primary.php how can I override this file in the child-theme to acomplish the task?

Hi Hei,

You can copy the same file on you child theme here:
wp-content/themes/x-child/framework/legacy/cranium/headers/views/global/_nav-primary.php

If the exact folder path is not yet there, please create it.

If the one you need to customize is this function x_output_primary_navigation, you can find it here:
\wp-content\themes\pro\framework\legacy\cranium\headers\functions\navbar.php
Copy the entire function and then paste it on your child theme’s functions.php. Edit the function as needed.

Hope this helps.

Thanks for the reply.

This doesnt work for some reason, are you sure it’s supposed to be the exact same folder structure,
can you verify that please?

As mentioned, I’ve already done that and it works.

Hey Hei,

I verify what Lely said. It works. The only conflict that I can think of is if you have headers/views/global/_nav-primary.php directly inside the framework folder. If that’s the case, please follow the parent theme structure. If there’s none, please review your custom code or better yet, upgrade to Pro so you won’t have to code to create a custom header.

Please note that we can point you to the files you need but we can’t get involved in fixing or enhancing custom codes.

Thanks.

1 Like

Not sure what you mean by this. You mean if a file named _nav-primary.php exists inside x/frameworks, or what?

I meant check if you have this structure framework/headers/views/global/_nav-primary.php.

Ok, thanks, it works!:slight_smile:

Glad we could help.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.