I am using the plugin PHP Browser Detection and I want to achieve different menus for different devices. I have set them up called primary and mobile.
Now, I want to switch those on used device. Something like this I have done and it is working fine:
if ( is_tablet() ) {
wp_nav_menu( array('menu' => 'primary' ) );
}
elseif ( is_mobile() ) {
wp_nav_menu( array('menu' => 'mobile' ) );
}
else {
wp_nav_menu( array('menu' => 'primary' ) );
}
Now, I would like to go further, because the tablet's design looks nice in landscape view but bad in portrait mode.
So, I ask you, if there is a way to check the orientation (on tablets) and then go for it, meaning to change the menu from primary to mobile.
Something like that maybe:
if ( is_tablet(portrait) ) {
...
Thank you very much, guys.