Shortcode variables
-
Hello, I am trying to show two different mobile menus based on a conditional. For the desktop menu I have defined two menu theme locations and doing this:
if ( is_page(123) ) { if( 'primary' == $args['theme_location'] ) { $args['theme_location'] = 'menu-alt'; } }
This works fine. For the mobile setup, I was hoping to do the same thing, but I can’t figure out the theme_location of the plugin – it seemed to be ‘mobile’, but that doesn’t work.
Then I tried to use the plugin shortcode, as described here https://responsive.menu/knowledgebase/using-the-shortcode/. But it doesn’t seem to use any variables, if I use:
<?php echo do_shortcode('[responsive_menu menu_title="Alternative Title"]'); ?>
it doesn’t change the title. Same thing with menu_to_use or theme_location_menu, they don’t seem to change the output, it’s always showing the menu set under general menu settings in admin.
I can’t find any more info about this, any pointers would be appreciated!
- The topic ‘Shortcode variables’ is closed to new replies.