Support » Fixing WordPress » excluding some submenu items when in mobile menu

  • Resolved lastala


    I am making a child theme of Libre2 and using a local server (MAMP). (So, sorry, cannot link the page.)

    I would like to exclude some submenu items when in mobile (“hamburger”) menu, but don’t know how to do that in Libre2. Any advice? Possible with CSS customising?

    I’ve tried for instance “If Menu”, but it does not work.

    Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)


    Forum Moderator & Support Team Volunteer

    If you examime your CSS, you’ll probably see an @media block that defines things either mobile or non-mobile (depending on whether you have a “mobile-first” theme. Using that CSS, you can un-display menu items.

    Without a site to look at, one can only give generic advice like that.

    there is a plugin for this specific menu for specific screens.

    Thank you, Steve and adnanhyder, for your answers!

    @steve: I’m a novice in WP, but will try the @media block – yes, it exists for instance in the style.css.

    @adnanhyder: I’ve tried to look for a plugin, but nothing seems to work for this template, for instance “if menu” and “menu item visibility control” do not work.

    Would appreciate any further thoughts!


    @media only screen and (max-width: 600px) {
        .menu idofli {
       .menu id1 {
        .menu id2 {

    idofli is replaced with the id of li view source and enter the ids.

    place in css file

    Thank you adnanhyder!

    I figured something similar that worked for me:

    @media screen and (max-width: 44.99em ) {
    #menu-item-1024 .sub-menu {
    display: none;

    Many thanks for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘excluding some submenu items when in mobile menu’ is closed to new replies.