• Resolved xvegax

    (@xvegax)


    Is there a way to determine the orientation within this plugin? Something like is_portrait or is_tablet(portrait)? I want to use two different menus on tablets, depending on orientation. Something like that:

    if ( is_tablet(landscape) ) { wp_nav_menu( array('menu' => 'primary' ) ); }
    elseif ( is_tablet(portrait) ) { wp_nav_menu( array('menu' => 'mobile' ) ); }
    elseif ( is_mobile() ) { wp_nav_menu( array('menu' => 'mobile' ) ); }
    else { wp_nav_menu( array('menu' => 'primary' ) ); }

    Is that manageable?

    https://www.ads-software.com/plugins/php-browser-detection/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Tablets' orientation (portrait/lansdscape)’ is closed to new replies.