简体   繁体   中英

Different menus for mobile and desktop version of site

I have one page in desktop version. I need to divide it into two pages for mobile version. I thought about making this pages with the cms (I'm using Wordpress) and add to the links in menu bootstrap classes hidden .

Is it possible to make a check box or something else to mark pages which must be hidden in desktop version?

An option here is to create two menus, one for the desktop version and one for the mobile version. There are a conditional tag in wordpress called wp_is_mobile() which you can use to display the menus conditionally. You can try something like

if(wp_is_mobile()) {
    //display mobile menu
}else{
   //display desktop menu
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM