WordPress.org

Ready to get started?Download WordPress

Forums

Logout Link In 3.0 Menu? (5 posts)

  1. kingjeffrey
    Member
    Posted 4 years ago #

    How can I add a logout link to the new menu system in WP 3.0?

    I know I can use the wp_logout_url(); php function within a template, but the menu system does not accept php content.

  2. Daniel Waltz
    Member
    Posted 3 years ago #

    I too am interested in this.

  3. Llasse
    Member
    Posted 3 years ago #

    So am I, as I just need the logout function, not all the other links

  4. Dana
    Member
    Posted 3 years ago #

  5. mrwweb
    Member
    Posted 3 years ago #

    Not too hard.

    Assuming your WordPress install is from the root, link to:

    /?action=logout&redirect_to=http://something.com

    and replace "something.com" with the page on your site you want to redirect to.

    If your WP is in a subfolder (e.g. http://something.com/blog/), then I assume you'd need to modify the link to:

    /blog/?action=logout&redirect_to=http://something.com

    but I haven't tried it.

    Enjoy!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags