Tagged: burger, functions.php, login, logout, menu
-
AuthorPosts
-
November 6, 2017 at 2:49 pm #873073
Hey Kriesi-Team,
there is a problem with the new Enfold Update to 4.2 an that Code (which puts login and logout links to the menu).I put this code snippet in my functions.php (childtheme):
// broken code.
With this code in the functions.php, the burger menu ist not clickable anymore. Bevor 4.2 it worked fine.
Thanks for your help!
TimoNovember 8, 2017 at 4:19 am #873970Hey Timo,
Thank you for using Enfold.
I checked the site and the link is clickable. Is this fixed?
Best regards,
IsmaelNovember 8, 2017 at 1:01 pm #874141Hi Ismael,
I undid the update to 4.2 cause of the problem. It’s still 4.1.2.
Thank you
Timo
November 9, 2017 at 7:12 am #874477Hi,
I see. Please update to version 4.2 so that we can inspect the issue. Or create a staging/dev site.
Best regards,
IsmaelNovember 9, 2017 at 11:24 am #874595Hi Ismael, you can find all information in private content. It’s now 4.2. Thanks for your help!
TimoNovember 9, 2017 at 3:38 pm #874716Hi Timo,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaNovember 9, 2017 at 3:42 pm #874721Hi Victoria,
yes of course.
November 10, 2017 at 7:05 am #875031Hi,
Thank you for the info.
You need to add a class attribute to the menu item. Replace the filter with the following code.
add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2); function add_login_logout_link($items, $args) { if( $args->theme_location == 'avia' ) { ob_start(); wp_loginout('index.php'); $loginoutlink = ob_get_contents(); ob_end_clean(); $items .= '<li class="menu-item">'. $loginoutlink .'</li>'; } return $items; }Best regards,
IsmaelNovember 10, 2017 at 12:30 pm #875119Yes, perfect! Thank you so much guys!
November 12, 2017 at 12:14 pm #875711Hi Timo,
Glad we got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.
