Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Change login / log out in main menu
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Change login / log out in main menu
- This topic has 15 replies, 2 voices, and was last updated 8 years by Kyle – SUPPORT.
-
Posted in: Neighborhood
-
January 18, 2016 at 2:45 pm #241394
Hi,
I can change the menu structure of my main menu. But i cannot change the login / log out option in that. Is that correct?
I would like to disable that and insert a text that directs to My Account.
Is that possible?Cheers
January 18, 2016 at 2:58 pm #241413Hi
You can disable the account aux options in the header options then add your own link to the menu
– Kyle
January 18, 2016 at 3:03 pm #241416Hi Kyle,
I have that on OFF already. Any idea?
Cheers
January 18, 2016 at 3:08 pm #241423Looks like your PHP files have been edited to add that login link, have you had a developer work on your site?
– Kyle
January 18, 2016 at 3:12 pm #241428Hi Kyle,
No, i didnt. Just me and you guys.
I only edited your tips and tricks from my topics and a memory edit in wpconfig php to increase to 128MB.Cheers
January 18, 2016 at 3:16 pm #241430Can you please send me the link to the topic about adding this link to the menu?
– Kyle
January 18, 2016 at 3:27 pm #241438Hi Kyle,
I am not aware that i logged a topic for this to enable it nor enabling this myself.
Can you tell me which file is changed?Thanks
January 18, 2016 at 3:30 pm #241439That login item in the main menu is custom, it’s not part of the theme, so someone must have added it for you. If it was one of my colleagues, you must have a topic about it
– Kyle
January 18, 2016 at 3:41 pm #241445I understand Kyle. I am not saying you changed it ๐
I had an alternative header plugin installed once for testing to see how it looks. Can that be the cause? I am sorry for any inconvenience..
ThanksJanuary 18, 2016 at 4:08 pm #241465Can you try deactivating all of your plugins to see if it’s anything to do with one of those
– Kyle
January 18, 2016 at 4:18 pm #241473I will install that plugin again to see if there is anything still in my settings or files left.
Otherwise i will have to disable everything tomorrow morning early early.
ThanksJanuary 18, 2016 at 4:19 pm #241475Ok no problem
– Kyle
January 18, 2016 at 5:21 pm #241532Hi Kyle,
I guess i copied this into my functions php. First trying after searching the knowledge base and then ask in a new topic ๐
/* ========================================
Login logout in menu mobile
===========================================*/add_filter( ‘wp_nav_menu_items’, ‘sf_loginout_menu_link’, 10, 2 );
function sf_loginout_menu_link( $items, $args ) {
if ($args->theme_location == ‘main_navigation’) {
if (is_user_logged_in()) {
$items .= ‘<li class=”custom_mobile”>Log Out‘;
} else {
$items .= ‘<li class=”custom_mobile”>Log In‘;
}
}
return $items;
}?>
<?php
However. Can this be done only for the mobile menu and not for the normal site? So that it still exists in the mobile version but is is normal in the pc environment?
Cheers,
MaartenJanuary 18, 2016 at 5:26 pm #241534Sure, add this to your custom css:
@media only screen and (min-width: 481px) { nav#main-navigation .menu > li.custom_mobile { display: none; } }
– Kyle
January 21, 2016 at 3:49 pm #242587Thanks, you can close this one
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.