Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter rodusa

    (@rodusa)

    I forgot to mention this has to be a static link in my template. Is there any php code to generate the href?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    <?php wp_loginout(); ?>

    Thread Starter rodusa

    (@rodusa)

    Jeff, Thank you.

    Thread Starter rodusa

    (@rodusa)

    Jeff, It did work but there is a glitch. Even after logged in it displays “Log in” while it should display “Logout”. When I click on it I can see the links “Panel, profile and logout”. Am I missing something?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    That is a WP core function. If it isn’t working for you, you should seek help in the appropriate forum.

    Thread Starter rodusa

    (@rodusa)

    That was cookie issue. I just cleared my browser temp and cookies and it worked.
    By the way, how display the UserName. Is there a shortcode or PHP code.

    Thanks you

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Believe it or not, this is another core WP function, which can be found at the Codex.

    <?php wp_get_current_user()->display_name; ?>

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Login link on Custom Theme Header’ is closed to new replies.