-
AuthorPosts
-
December 7, 2015 at 6:20 pm #548196
Hello, i’ve used the posted on a previous thread and it’s working fine. But i need to create submenu itens on this login button, how can i make one submenu link for my-account for exemple?
Here goes the link of the previous post i’ve used
https://kriesi.at/support/topic/add-login-log-out-links-to-top-menu/
RegardsDecember 8, 2015 at 7:42 am #548563Hey druzes,
Could you provide us with a link to the site in question so that we can take a closer look please? I’m not sure I understand exactly what you are trying to achieve, could you try to explain a bit further as well?
Best regards,
RikardDecember 8, 2015 at 1:29 pm #548710Hi, since i’ve created the “entrar” menu item with a code added in the functions.php file, i can’t add a submenu item, in the menu editor in the wordpress.
The code i’ve added to the functions file was this:// Add Log in / log out links to top menu add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 ); function add_loginout_link( $items, $args ) { if (is_user_logged_in() && $args->theme_location == 'avia') { $items .= '
- Log Out
'; } elseif (!is_user_logged_in() && $args->theme_location == 'avia') { $items .= '- Log In
'; } return $items; }Now i need to create subitens on this menu with links for my-account page and other pages.
Thank you for the support.- This reply was modified 8 years, 11 months ago by Yigit. Reason: added code tags
December 9, 2015 at 5:52 am #549477Hi,
Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Thanks,
RikardDecember 9, 2015 at 12:26 pm #549636Here it goes
December 9, 2015 at 1:37 pm #549666Hi!
Would adding your login and account buttons to your menu as custom links and hiding them to logged in/logged out users using custom CSS not work for you?
If it would, you can go to Appearance > Menus and add new custom links and then click “Screen options” on the top right corner and check CSS classes and edit your menu items and give them custom CSS class and add following code to Quick CSS in Enfold theme options
.logged-in .your-custom-login-button-class { display: none !important; } .logged-in .your-custom-account-button-class { display: block !important; } .your-custom-login-button { display: block; } .your-custom-account-button-class { display: none; }
Regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.