-
Hi there, please read the rules first 🙂
http://userproplugin.com/userpro/forums/topic/please-read-the-support-rules-before-posting/
ok
read it,
1)I already verified my account here before (should i do it every time i post?!)
2)I didnt think that i need URL because the problem doesn’t required it butYOGA74.CO.IL
i want on of my menu links to open with popup-login.
10X for the help
Giraffa
Add the class popup-login to nav menu class or link class to activate Login popup.
Ok I can see the popup,
(1) is any way to design some other popup? how can i cotrol the design of this? it look weird…
(2) Is the “login” link can change to “logout” after loging in? (i think this is the right way right? maybe even i can design it to be with the user profile picture?)10X
GIRAFFAExample of my code with login/logout
PHP12345678910111213<?phpif ( is_user_logged_in() ) {?><a href="<?php echo wp_logout_url( $redirect ); ?> " class="btn btn-danger pull-right">Logout</a><?php} else {?><a href="#" class="popup-login btn btn-success pull-right" data-login_button_secondary="">Login</a><?php}?>Edit: Can’t seem to get code tags right, here’s an image example:
In your theme’s template… for example header.php or wherever you want these login/logout buttons to appear.
To add it to a menu, here’s a good example: http://www.wpsymposium.com/2013/02/add-loginlogout-automatically-to-wordpress-menu/
ok i want to add to the menu,
i add the code, but know what should i do? add id to the menu li? how?
please take a look hereURL
http://www.giraffa-media.co.il/test/10X for your help man
GIRAFFA
Here you go – tested and works:
Add this to your functions.php and make changes as necessary.
Alternatively you can maybe try this plugin?
10X I installed the plugin but just to understand one last thing,
After i added this to the functions.php, what else should i do?
I need to add the php to the header right? is there anything else?10X Very Much!
Have A good dayGiraffa
You can use the plugin I mentioned above OR you can use my code in your functions.php file.
If you want to use my code the only thing you have to change is the $theme_location variable to whatever you menu location variable is. For example my main menu location is called “main_menu”. There shouldn’t be anything else you need to do.
If you’re using the plugin, haven’t test the plugin yet, but I am assuming you will add it to the menu via the UI and choose the login|logout option and add the “popup-login” variable to the menu item.
Had a look on your website and see you have implemented it.
Ok thanks for explaing!!!
i rather do it with this code and use less plugins. (it make sense right?)But one more thing:
do you know/thing it’s possible to have a different control over the login/logout because i realy want after login the user to see “my profile” and have a little drop down with few options (“my followers, my profile, log-out”), including the profile picture in small thumbnail, like it is in many website.
Show i try figure this out or is it possible to do this with the plugin?
10X
NirEasiest way would be to use conditional statements, something like this plugin should help: http://wordpress.org/plugins/if-menu/
If you are familiar with WordPress filters then you can code something in functions.php to make it work.
You must be logged in to reply to this topic.