milohuang / reverie

Reverie is a versatile HTML5 responsive WordPress framework based on ZURB's Foundation.
http://theakiba.com/reverie/
MIT License
919 stars 196 forks source link

changing menu items for mobile #288

Closed randomfreeform closed 10 years ago

randomfreeform commented 10 years ago

I'd like to change the menu list when someone visits my Reverie site using a mobile device - specifically a phone. Can someone please tell me how best to code this?

I believe this is best achived by coding something in the theme's TopBar header? I also know there are Foundation 'media queries' for 'small' or screen sizes that might be used to make the menu switch... and I could setup a menu in WP 'Menus' using Grunteries 'Additional' or Utility' menus (though don't want to see them except for small). I tried coding all this but it didn't work.

( The above is the most critical need here but in the same realm.. what is the 'best' way to sense if someones using a mobile/phone when they first arrive at the site and redirect them to a different home page? )

THANKS for any help!! R

randomfreeform commented 10 years ago

George just confirmed I was on the right track elsewhere... thanks George!.. So I just did it again and it works great..

For others, I put the 'show...' class in the header like this: <section class="top-bar-section show-for-medium-up"> Duped the section, unCommented the 'Additional' menu part and commented out the ususal menu and put in <section class="top-bar-section show-for-small-only">.

cheers R