Inserting logout link into Montezuma
I wish to add logout link into the header, but I'm having problems:
1. Adding <a href="/wp-login.php?action=logout">Logout</a> redirects to a page asking to confirm logging out (undesired) 2. Adding the usual <a href="<?php echo wp_logout_url(); ?>">Logout</a> into header subtemplate doesn't output the actual logout link I know that I could create a widget and use that to output the logout link, but that feels a bit like joining the marines just to learn to fold the underwear. Any idea how to create a simple logout link? Is it possible to create an extra php file and call it from a subtemplate or something like that? If so, what would be the steps? |
I don't remember where I got this code snippet from, but it adds a logout menu item to the end of the menu. What I like about it is that the logout link becomes part of the menu, instead of a separate link.
Code:
<?php |
Thanks, I saw that in one of the discussion on Wordpress.org too, but sadly the design requirements are for a logout link outside the menu (essentially in a custom created div that site at the very top of the site).
Could this be done by calling an external php file somehow? |
Try this, add the following to the end of function.php
HTML Code:
//Logout Shortcode HTML Code:
<?php echo do_shortcode('[wplogout linktext="Logout"]'); ?> |
Thank you JD, you da man, as always.
Side note, sent you a PM regarding something unrelated a few days ago =) |
All times are GMT -6. The time now is 10:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.