• I have installed WP 2.7 and have tried both Ajax Login and Sidebar Login for my users on the front end. On both of them when the logout button is clicked nothing happens

    Any ideas?

Viewing 11 replies - 1 through 11 (of 11 total)
  • 2.7 uses a new function that outputs the logout url. Just use this code
    <?php echo wp_logout_url(); ?>

    Thread Starter morphzan

    (@morphzan)

    Thanks for the prompt response, Do I just add that code to the anywhere into the sidebar.php file?

    Whereever you would like the link to show up. You actually use the code like this.
    <a href="<?php echo wp_logout_url(); ?>">Logout</a>

    Thread Starter morphzan

    (@morphzan)

    I have added that code into the php file.
    It shows two logout buttons which is okay but when i hit the new one i get an error:

    “The requested URL /< was not found on this server.”

    Please forgive my ignorance..Im very new to editing plugins etc….

    Where are you adding the code?

    Thread Starter morphzan

    (@morphzan)

    When i look through the file i see:

    <li class=”page_item”>‘.__(‘Dashboard’).’
    <li class=”page_item”>‘.__(‘Profile’).’
    <li class=”page_item”>‘.__(‘Logout’).’

    I add it just after that or in theory you could replace the last one although im probably extremely mistaken

    Is that in a plugin file though. Try putting it directly in your sidebar.php file.

    Thread Starter morphzan

    (@morphzan)

    I put in in the sidebar.php but same thing happened
    Is there anyplace in particular i need to put it?

    You need to place the code in “al_template.php” in the “ajax-login” folder.

    Look for this in al_template.php:
    /******* This part is drawn when user IS logged in. *******/

    This is where the code needs to go:
    <a href="<?php echo get_settings('siteurl') . '/wp-login.php?action=logout&amp;redirect_to=' . $_SERVER['REQUEST_URI']; ?>"><?php _e('Logout'); ?></a>

    So now it should look like this:
    <a href="<?php echo wp_logout_url('/wp-login.php?action=logout&amp;redirect_to=' . $_SERVER['REQUEST_URI']); ?>" title="Log out">Log out</a>

    Hope this helps. ??

    Hi Friends,

    This problem is not big problem ??

    Use this codes :
    ‘.$usp_language[‘logout’].’

    For all more webmasters ?nformation CLICK HERE

    Up to here this is code : )

    <a href="'.wp_logout_url(get_option('siteurl')).'" title="'.$usp_language['logout'].'" >'.$usp_language['logout'].'</a>

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Sidebar Login – cant log out’ is closed to new replies.