• Resolved s0what

    (@s0what)


    <?php echo wp_logout(); ?> doesn’t work but
    <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="Atslēgties"> Atslēgties</a> works!

    Why?

Viewing 4 replies - 1 through 4 (of 4 total)
  • MichaelH

    (@michaelh)

    I don’t believe you echo wp_logout as according to Function_Reference/wp_logout that

    Log the current user out, by destroying the current user session.

    Your code looks okay or you could use wp_loginout.

    Thread Starter s0what

    (@s0what)

    I tried echo, because it didn’t work without echo either.
    wp_loginout is not the thing which I need in current situation.
    Also wired that when using wp_logout_url it asks confirmation.

    Thread Starter s0what

    (@s0what)

    When I removed wp_logout();, confirmation also disappeared.

    Thread Starter s0what

    (@s0what)

    ohh, I understood what this function does. ?? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_logout(); doesn’t work on latest WP’ is closed to new replies.