Home>Support>Home page PageBuilder widget triggering current-menu-item

Home page PageBuilder widget triggering current-menu-item

I used the class “current-menu-item” to style the navigation button differently for the current page.

I used PageBuilder on the home page, with a Post Loop widget to display recent posts from a custom post type.

Now both the home button AND the navigation button for this custom post type are being given the class “current-menu-item” and show the different styling. And idea how I can stop the custom post loop from taking on “current-menu-item” on the home page? (Without affecting the menu behavior on the custom post type’s archive page.)

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Hi. Perhaps try temporarily removing your custom CSS and rather using the current page item options under Appearance > Customize > Menu as I don’t think those will clash with the Post Loop widget. For those options to work in the Customizer you must have a custom menu saved under Appearance > Menus and that menu must be assigned to the primary menu position.

  2. 10 years, 4 months ago jsj9625

    Thank you, I’ll look into that as well. I ended up using jQuery removeClass to target the button on only the home page.

  3. 10 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Super, glad you found a solution.

    Another fix would have been to limit your CSS to #masthead .site-navigation.

    All the best.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More