Home › Forums › Community Forum › Login shortcode
This topic contains 8 replies, has 4 voices. Last updated by Jim Climy 4 years, 6 months ago.
Topic Author | Topic |
---|---|
Posted: Wednesday Jun 6th, 2012 at 6:57 am #15676 | |
|
|
Is their a login shortcode that I can use instead of the login widget? |
List Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Wednesday Jun 6th, 2012 at 8:28 am #15680 | |
|
|
Try adding this to your theme’s functions.php file:
Then use this shortcode:
I have not tested this to it’s full extent, but it seemed to work for me. I don’t know that there is a standard shortcode for this. I didn’t see one. Hope that helps. Dave |
|
Posted: Wednesday Jun 6th, 2012 at 9:15 am #15683 | |
|
|
Also, I found this in the s2member Codex:
This allows you to add options and arguments to your login code in the functions.php file like so:
Hope that helps, Dave |
|
Posted: Thursday Jun 7th, 2012 at 8:46 pm #15874 | |
|
|
Dumb question but then how could you add the login as a menu item then? |
|
Posted: Friday Jun 8th, 2012 at 8:20 pm #15997 | |
|
|
Jim, You could add a menu item manually by editing your theme’s header.php file, or if your theme supports custom menus you can do it through Appearance -> Menus, and point the link to your login page (e.g., /wp-login.php). |
|
Posted: Monday Jun 11th, 2012 at 5:38 pm #16157 | |
|
|
@Jim Climy Are you looking to just link to the page where you put the link shortcode, or are you trying to add the login form inline in your menu bar? Dave |
|
Posted: Monday Jun 11th, 2012 at 5:40 pm #16158 | |
|
|
Ideally a popup or similar that allows you to login from the menu, but I guess a link to a login form is OK. |
|
Posted: Tuesday Jun 12th, 2012 at 8:44 am #16241 | |
|
|
I just found this trick and it may not be the best way to do this but I think it will work. I’m going to assume you know how to create a modal popup (suggest jquery). Steps:
Make sure you add the “return false;” so it doesn’t try to follow the actual link. The problem with this is that it’s javascript so if someone has it turned off, then it will follow the link. I would suggest creating a page with the login widget as it’s content, then using that page to link to. That way if the user’s JS isn’t working or turned on, it still sends them to a login screen. You should be able to do the same by using the http://yoursite.com/wp-login.php instead of creating a page, if you want. Hope that helps, |
|
Posted: Thursday Jun 21st, 2012 at 1:40 pm #17142 | |
|
|
Unfortunately I don’t know how to add a modal popup. Is this what this website has? Seems to have a popup login form that comes up when I am logged out and click “login” in top left? |
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.