Sub-menu indicator not working correctly in menus
2 Attachment(s)
Getting a weird issue with menus not working correctly.
Site has a defined menu in Wordpress (WP4.4). Two top level options first up that have no sub-menus, then 3 options that do have sub-menus. Atahualpa is configured to use the menu as the first option. Issue seems to be that the `rMenu-expand` class gets added to the first menu entry that doesn't contain a sub-item which appears before the menu entry that contains a sub-item (instead of the entry with sub-items). In the case of my site this is the first menu entry "Home". Site: http://www.hackmelbourne.org (Connected Community Hackerspace in Melbourne, Australia) Works fine with the twentyfifteen theme, but it doesn't really add a class like this (just sub-items). Have tried with no plugins. Also tried without & in the menu entry title. Also tried recreating the menu entry from scratch. Tried with and without my child theme. Config attached, but pretty sure this is a code bug. Also attached is a pic of the menu as currently configured in WP. Most items in the menu are Pages, so should be easily reproduced. FYI: Moving "Blog" after "About CCHS" (and it's sub-items) ends up with a sub-item marker attached to "Blog" as well (the one from "About Rules & Policies" disappears). |
I'm getting the same thing. I'm also on WP 4.4, and Ata is up to date. I believe it happened for me right after the 4.4 update.
|
@cefiar - I can't reproduce it with your export. Mind sending me a PM with an admin id/pw so I can poke about?
EDIT: NEVER MIND - I HAVE REPRODUCED IT. Now let me see hat is happening... |
Great to see you've reproduced it.
As @dabeed said, it only seemed to appear once updated to 4.4. I upgraded my test site first and didn't notice it before I upgraded the live site. I only noticed as I had another tab open from before the upgrade (live site) that I hadn't refreshed. @juggledad - Many thanks for your time on this. As always, it's appreciated. |
The problem is caused by wordpress changing the string the custom menus returned. The good news is (after banging my head on this for a loooooong time) it is a simple fix, so please try this.
edit bfa_new_wp3_menus.php and change line 43 from HTML Code:
$newmenu = preg_replace("/<li (.*?)class=\"(.*?)\">(.*?)\n(.*?)<ul class=\"/i","<li \\1 class=\"rMenu-expand \\2\">\\3\n\\4<ul class=\"rMenu-ver ",$newmenu); HTML Code:
$newmenu = preg_replace("~menu-item-has-children~","rMenu-expand menu-item-has-children",$newmenu); |
It works (for me)! Thank you so much, Juggledad! You = Da man. : )
One issue: I have this CSS, for making the menu slightly transparent: Code:
ul.rMenu-ver { |
Ok one fix for the issue above is to change the CSS to:
Code:
ul.sub-menu { |
I agree, you're definitely "Da man" @Juggledad!
Fix is now in and working perfectly! @dabeed - I might just steal that menu opacity CSS idea. ;) |
All times are GMT -6. The time now is 12:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.