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. active page to appear at top of a menu

active page to appear at top of a menu

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 66 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.
  • E Offline
    E Offline
    emresenoglu
    wrote on last edited by emresenoglu
    #1

    hello all - i'm trying to create a system where only the active page is shown in a certain menu - so for example for a menu of 3 pages (about, services, contact), only the active page title will be shown in the menu and the others will appear as sub items when mouseover is active. currently i was able to achieve this with using css to hide one menu and show the other, but i am running into the 4 menu limit, now that i have 5 different pages i want this to work on (2 pages in central menu and 3 in the right menu).

    is there a smarter way of achieving this? i am just getting started with basic css, but im hoping there is a way to do this that i can't think of due to my currently limited web skills. many thanks!

    current situation of the website: senoglu.co

    Screenshot 2025-07-27 at 18.25.11.jpg

    senoglu.co

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

      hey!

      if you are on a page, its menu item gets the class ".current-menu-item"

      /*hides all menu points*/
      nav li > a{
      opacity: 0!important;
      }
      /* shows only the currently active menu point */
      nav li.current-menu-item > a{
      opacity: 1!important;
      }
      

      maybe this? not sure

      this will only show the active menupoint but hide the others. but im not sure if that makes sense cause you want to show the other menu points in a submenu.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        emresenoglu
        wrote on last edited by emresenoglu
        #3

        hey armin thanks for the help. hm i don't think that works as intended as I have 2 menus on certain pages (like the one you see above): the middle menu (project) and the right menu (contact/about).

        i'm basically trying to cycle the menu items between three pages: contact, about, services. if i'm on services, then that's on top and visible, while contact and about are sub items (and therefore hidden). if i'm on about, the other two are sub items and so on. does that make sense?

        senoglu.co

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

          hey you cant really make some menu items submenu items depending on what page you're on :/

          maybe you'd need to come up with some custom html for that

          1 Reply Last reply
          0
          • E Offline
            E Offline
            emresenoglu
            wrote on last edited by
            #5

            alright, got it thanks armin - will look into that

            senoglu.co

            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
            J
            jacksong
            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