Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

On-page navigation styling (current page)

  • hey there,
    i’ve created a block element which i’m hooking into inside_site_container.
    this is going to appear on 4x pages, a parent & 3 child pages.
    i’d like to style the child pages based on whether or not the user is on that page (make the link bold & underlined).
    there doesn’t seem to be any current_menu_item class which I can target.
    maybe I’m using the wrong type of block, or looking in the wrong place?
    anyway, you can see what I’m trying to achieve, can you help me sort it out?
    thanks!
    Jason

  • Hi Jason,

    Try using a WordPress Navigation Block. That adds a current menu item to the visited link by default. Reference: https://wordpress.org/documentation/article/navigation-block/

  • perfect, thanks for your patience Fernando

  • You’re welcome!

  • hi there,
    so i’m revisiting this as the client has changed their mind.
    they still want this breadcrumb style navigation, which has the underline for the page you’re currently on
    https://share.cleanshot.com/GKDbGx22
    but they’d prefer it to *not* be a hamburger style navigation when viewed on mobile
    https://share.cleanshot.com/gyPFhDNQ
    it’s the wp navigation block that is currently enabling the underline for the current page / menu item.
    could you let me know the best / easiest way for me to change this so they are simple text links on mobile (like on desktop) – as opposed to the hamburger style (on mobile)?
    thanks heaps,
    Jason

  • Hi Jason,

    Yeah, you can just switch off the overlay menu so that the hamburger menu won’t be displayed on mobile.

    Select the Navigation block, navigate to Block settings on the right-hand side; it’s right under the Display option.

  • ha! so easy – so to waste your time Alvind

  • No problem!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.