[Support request] Impossible to modify the active menu button via CSS when it leads to a post.

Home Forums Support Impossible to modify the active menu button via CSS when it leads to a post.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
  • #1519961
    Luiz Guilherme

    In GeneratePress Free, it is not possible to define a color for a menu option when this option is selected.

    For some reason, when a menu item is created that points to a “Post“, the “current-menu-item” class is not added.

    Therefore, it is not possible to modify this button when it is active.

    Luiz Guilherme

    Note: If when creating the button, I use the “LINK” option and manually enter the post address, instead of using the “POST” option the error does not occur.

    Customer Support

    Hi there,

    can you share a link to your site where i can see the issue and get a better understanding of the problem.

    Luiz Guilherme


    I use the follow CSS code to change color of the selected menu buttom.

    /* MAIN MENU */
    /* Selected Menu */
    .main-nav ul li[class*="current-menu-"] > a,
    /* Mobile Menu */
      background-color: #ffca08!important;
      color: #515151!important;

    But Doesn’t work when a menu buttom is created by select the “POST” on screen of “Menu Edit”.

    The button created this way doesn’t have the class “current-menu-item“.
    And this class is need on this part of css:
    .main-nav ul li[class*=”current-menu-“] > a

    The problem also occour on mobile menu.

    Test yourself: See that when you select the TRANSPARENCIA 2 menu it does not change color.

    Luiz Guilherme

    Test yourself:

    See that when you select the TRANSPARENCIA 2 menu it does not change color.

    Luiz Guilherme

    I would like to take the opportunity to report another failure:

    In wordpress, when something is not found it displays a search field, but on this site, the “Search” button has a layout problem.

    See this link:

    Customer Support

    How is the TRANSPARENCIA 2 page set up?
    If i inspect TRANSPARENCIA 2 in the developer tools it is defined as a PAGE. Whereas the Menu Item link is defined as a Post. This is not normal behaviour.

    Luiz Guilherme
    Customer Support

    Do you have a Page with the same title as the Post ?

    See here – the link takes you to this which is a Page:

    Luiz Guilherme

    01 – Perfect, that was it. I had created a page first, so I changed my mind and decided to use a Post, but do not delete the page.
    With the exclusion of the page everything is working fine.

    02 – What about the Search button that is not displayed correctly?

    Customer Support

    Can you try changing the Customizer > General –> Icon Type to SVG

    Luiz Guilherme

    It worked.

    I defined the font, because in the future I intend to create a package of personalized fonts, following instructions that I had here

    I have other old sites that I use the “font” option and the text “Search” is displayed instead of the “magnifying glass” icon.

    Does the “Font” option no longer work?

    Customer Support

    It should work – try switching back to Icon > Font and clear any caches.

    Luiz Guilherme

    I tried this, the error persists whenever I re-active the “Fonts” option.

    Even on the smartphone, regardless of the browser used, the error occurs.

    I have also tried to disable all plugins and the error occurs.

    I use a child theme on this site, so I tried to activate only the parent theme, and the error persists.

    I am using WordPress version 5.5.3 – pt_BR.

    Customer Support

    Weird. Maybe leave it as Icon. You can use Filter to switch them – heres an example of that:


    Happy to help if you need assistance switching any of them over to your own SVGS.

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