Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Show third menu only on front page

Show third menu only on front page

Scheduled Pinned Locked Moved General Discussion
9 Posts 3 Posters 120 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ricardowiesinger
    wrote on last edited by
    #1

    Hi @arminunruh,

    I'm looking for a way to have my third menu item (next to the title) only visible on my front page. I tried some of the custom css I found here on the topic, but was not able to do it. Any hint would be highly appreciated :). My website:
    https://www.ricardowiesinger.de

    Best
    Ricardo

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      .third_menu{
      display: none;
      }

      body.slug-home .third_menu{
      display: block;
      }

      R 1 Reply Last reply
      0
      • arminunruhA arminunruh

        .third_menu{
        display: none;
        }

        body.slug-home .third_menu{
        display: block;
        }

        R Offline
        R Offline
        ricardowiesinger
        wrote on last edited by
        #3

        @arminunruh Thank you! Unfortunately the third menu still appears on all pages.

        1 Reply Last reply
        0
        • arminunruhA Offline
          arminunruhA Offline
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          .third_menu{
          display: none!important;
          }

          body.slug-home .third_menu{
          display: block!important;
          }

          this should work :)

          R 1 Reply Last reply
          0
          • arminunruhA arminunruh

            .third_menu{
            display: none!important;
            }

            body.slug-home .third_menu{
            display: block!important;
            }

            this should work :)

            R Offline
            R Offline
            ricardowiesinger
            wrote on last edited by
            #5

            @arminunruh Works perfectly now, thank you!!

            1 Reply Last reply
            0
            • R Offline
              R Offline
              RenataMGr
              wrote on last edited by RenataMGr
              #6

              Hello! A short follow up on this one.
              I'd like my second menu to be on front page AND on the about page too, and to not appear on the rest of pages. My second menu is my language menu operating with polylang atm. The solution above works like a charm without Polylang, but when I added the plugin the second menu disappeared on all pages. How can I make my second menu appear on front page, about page, keeping polylang?

              1 Reply Last reply
              0
              • arminunruhA Offline
                arminunruhA Offline
                arminunruh
                Global Moderator
                wrote on last edited by
                #7

                do you have a link?

                R 1 Reply Last reply
                0
                • arminunruhA arminunruh

                  do you have a link?

                  R Offline
                  R Offline
                  RenataMGr
                  wrote on last edited by
                  #8

                  @arminunruh this is the link. [https://devoorkamer.org/](link url)
                  Although Im working on the most recent version of the site on my local host. On the link the Polylang is not installed yet and the main menu doesnt have all the pages. Attaching a screenshot with the most recent version with annotations for reference.

                  Screenshot 2023-10-25 at 10.06.15.png

                  1 Reply Last reply
                  0
                  • arminunruhA Offline
                    arminunruhA Offline
                    arminunruh
                    Global Moderator
                    wrote on last edited by
                    #9

                    interesting!

                    maybe you can manage to code this!
                    you just need to find out the body classes you need:
                    https://laytheme.com/documentation/custom-css-styling.html#css-based-on-current-page

                    Screenshot 2023-10-26 at 13.30.41.png

                    look at this example

                    this has the class slug-imagehover-test

                    so i use the css body.slug-imagehover-test

                    Screenshot 2023-10-26 at 13.31.52.png

                    try to learn how to use the chrome inspector. i inspect the html and i see the <nav has the class primary

                    so i do:

                    body.slug-imagehover-test nav.primary{
                    display: none!important;
                    }
                    

                    to hide that menu on that page

                    this way you can hide or show menus depending on which page you are on

                    good luck

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    I also code custom websites or custom Lay features.
                    šŸ’æ Email me here: šŸ’æ
                    info@laytheme.com

                    Before you post:
                    1. When using a WordPress Cache plugin, disable it or clear your cache.
                    2. Update Lay Theme and all Lay Theme Addons
                    3. Disable all Plugins
                    4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                    This often solves issues you might run into

                    When you post:
                    1. Post a link to where the problem is
                    2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                    3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                    Online Users
                    A
                    alasdair17
                    Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                    laytheme.com
                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Search