using in navigation menu
-
hello, anyway to use wp modal login in navigation menu?
thanks
-
At this moment there’s no way, but something I was thinking of the other day. I’ll see about adding this feature in a future version.
Using it in wp nav:
paste this in your functions.php
/**
* Hook to implement shortcode logic inside WordPress nav menu items
* Shortcode code can be added using WordPress menu admin menu in description field
*/
function shortcode_menu( $item_output, $item ) {if ( !empty($item->description)) {
$output = do_shortcode($item->description);if ( $output != $item->description )
$item_output = $output;}
return $item_output;
}
add_filter(“walker_nav_menu_start_el”, “shortcode_menu” , 10 , 2);
and then in your nav description section paste in shortcode.
In the nav description section???
Shouldn’t it be in the URL field? it is not workingNevermind, got it.
Thank youCould one of you explain fully how you implemented this as I’m a bit confused as to the process and desperately want this in my navigation menu as well.
Many thanks
Where in my theme functions.php do i paste the code and what short code do I enter into my nag description?
Cheers
you have to paste it at the end of your theme’s functions.php file. Then, go to Menu in the WP-admin area, enable description under screen options (upper right corner), leave the URL field empty and paste the shortcode in the description field.
Bests
using this the logout function is not working..
Please check http://metainfos.com/demo/
@ani7ruddha
The shortcode to use is:
[wp-modal-login login_text="Login" logout_text="Logout"]You should paste this in a custom menu item with
URL: http://#
Navigationlabel: Login/Logout
Description: the shortcodeSave the menu and it should become visible and functional.
it breaks the logout function 🙁
Just a quick update, I have begun working on the next major release, 2.1, and it will officially support wp_nav_menu() support.
No set release date, but you are always more than welcome to install and test the bleeding edge versions on the GitHub account https://github.com/colegeissinger/wp-modal-login
sound great! Is it possible to add on navigation with current GitHub version? or do I have to wait more?
Not available yet in the bleeding edge versions, but you can follow the repo and you should get notifications about any updates when they roll out.
Just remember, branch 2.1 is an alpha version so I wouldn’t install it on any live servers 🙂
Waiting for the good news, thanks Cole!
I am stuck and have spend all day trying to add a jquery login form. Please help!!!
Where is the nav description section and which shortcode should be pasted in there?
Thank you.
The topic ‘using in navigation menu’ is closed to new replies.