-
eluyawi
Hi,
I am testing the mobile and I have found an of configuration Error.
What I need to do in the mobile version
If I am in the main page, it should display the “Main Menu”.
If I am in the Subscriber page, it should display “Estudiante Menu”.How can I do this configuration?
-
Hi there,
this is what i see on your mobile menu:
https://app.screencast.com/7a8KXorL6T9ki
And according to the ID it is loading:
menu-estudiante-2
-
eluyawi
I don’t understand what you are showing me. If it is the main page or the subscriber page. (It’s possible that I was testing at that time)
Anyway, you have in the private box, the configuration of the “main-menu” and “Estudiante-menu”.
In the mobile version
– The main menu is shown on the home page and on the subscriber page.
– Now, except for the home page, I only need to display the “Student-menu” on the subscriber pages and on the different pages of their links. I means, I need the same behaviour that the Desktop version -
It was the Subscribers page i was showing you, and that WAS showing the
menu-estudiante-2
-
eluyawi
Hi David, the mobile version shows the “main-menu”, That is the problem.
(Attached screenshot on the private box) -
If you disable the Off Canvas panel on mobile, Do you see the correct menu ?
-
eluyawi
Exactly, I have disabled the Off Canvas panel on mobile and it works correct on the mobile version BUT
it doesn’t show this design for mobileHere you have screenshot when I have disabled the Off Canvas panel (it works correct) and when I have activate the OFF panel only a Mobile( this option the main menu always appears)
https://postimg.cc/gallery/1Z0DkFzqSomething I am making wrong.
-
You added a custom function for swapping the menus, correct ?
If so please share the code here, as it will need to be amended to include the off canvas menu. -
eluyawi
This is the code
add_filter( 'wp_nav_menu_args', function ( $args ) { if ( 'primary' === $args['theme_location'] && (is_page( array( 3045,3290,3357,3348)) || is_bbpress() || bbp_is_forum_archive() ) ) { $args['menu'] = 'Menu Estudiante'; } return $args; } );
-
Fernando
Hi there,
Try updating that snippet to this:
add_filter( 'wp_nav_menu_args', function ( $args ) { if ( ( 'primary' === $args['theme_location'] || 'slideout' === $args['theme_location'] ) && (is_page( array( 3045,3290,3357,3348)) || is_bbpress() || bbp_is_forum_archive() ) ) { $args['menu'] = 'Menu Estudiante'; } return $args; } );
- You must be logged in to reply to this topic.