to add logout button on menu bar
-
I have uploaded the plugin for a logout button, but I do not know how to add the <?php do_action(‘posts_logout_link’,’Log out!’); ?> to my theme menu.
The function of the logout is for password protected blog. I follow the instruction and insert the above code in the footer.php just before the <body> at the end. It did not work even when I entered my password to be in the blog.
The instruction says,”<?php do_action(‘posts_logout_link’,’Log out!’); ?>
Try adding the code somewhere in sidebar.php. If your sidebar uses widgets it might not show up, so if not, try adding it to footer.php.
Remember you have to be “logged in” to a password protected post in order for the link to even show up, so make sure you’ve entered a password to a post when you check for the link. Once you’ve got the link to show up, you can then experiment with its placement.I think I must not understand where to add the code. I really want the logout button to show up on the right hand side of the menu bar just under the theme image for all pages and posts.
Many thanks.
Tsing
- The topic ‘to add logout button on menu bar’ is closed to new replies.