Home › Forums › Support › Impossible to modify the active menu button via CSS when it leads to a post.
- This topic has 21 replies, 3 voices, and was last updated 2 years ago by Luiz Guilherme.
-
AuthorPosts
-
November 5, 2020 at 10:27 pm #1519961Luiz 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.
November 5, 2020 at 10:30 pm #1519963Luiz GuilhermeNote: 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.
November 6, 2020 at 5:07 am #1520278DavidStaffCustomer SupportHi there,
can you share a link to your site where i can see the issue and get a better understanding of the problem.
November 6, 2020 at 7:34 am #1520681Luiz GuilhermeSite:
https://pestalozzipontobelo.com.br/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 */ .menu-toggle[aria-expanded="true"] { 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-“] > aThe problem also occour on mobile menu.
Test yourself: See that when you select the TRANSPARENCIA 2 menu it does not change color.
November 6, 2020 at 8:20 am #1520727Luiz GuilhermeTest yourself:
See that when you select the TRANSPARENCIA 2 menu it does not change color.
November 6, 2020 at 8:23 am #1520729Luiz GuilhermeI 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:
https://pestalozzipontobelo.com.br/category/lojinha/November 6, 2020 at 8:46 am #1520754DavidStaffCustomer SupportHow 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.November 6, 2020 at 9:50 am #1520851Luiz GuilhermeIs defined “Post”.
https://mega.nz/file/cIMAVBKY#4MngZltHRQPC5QLNudkfM1GtXZcWzvjZMHoGlE4VS2A
November 6, 2020 at 10:55 am #1520942DavidStaffCustomer SupportDo you have a Page with the same title as the Post ?
See here – the link takes you to this which is a Page:
November 6, 2020 at 11:10 am #1520960Luiz Guilherme01 – 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?
November 7, 2020 at 4:43 am #1521501DavidStaffCustomer SupportCan you try changing the Customizer > General –> Icon Type to SVG
November 7, 2020 at 7:29 am #1521788Luiz GuilhermeIt worked.
I defined the font, because in the future I intend to create a package of personalized fonts, following instructions that I had here
https://generatepress.com/forums/topic/how-to-display-other-icons-fonts-besides-the-magnifying-glass/#post-1438058I 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?
November 7, 2020 at 1:25 pm #1522018DavidStaffCustomer SupportIt should work – try switching back to Icon > Font and clear any caches.
November 7, 2020 at 3:36 pm #1522065Luiz GuilhermeI 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.
November 8, 2020 at 6:23 am #1522419DavidStaffCustomer SupportWeird. Maybe leave it as Icon. You can use Filter to switch them – heres an example of that:
https://generatepress.com/forums/topic/svg-menu-icon-bars-fatter/#post-1520827
Happy to help if you need assistance switching any of them over to your own SVGS.
-
AuthorPosts
- You must be logged in to reply to this topic.