how to get username showing with logout link (2 posts)

  1. dotnature
    Posted 10 years ago #

    How would I display the username with the logout link like in the dashboard. Im using <?php wp_loginout(); ?>

    Ive tried to add ?><?php the_author(); ?> to this but I doesnt show up.

    I would also like a link to user profile to show up only if the user is logged in.

  2. dotnature
    Posted 10 years ago #

    Bump for reply..let me clarify maybe that will get more insight.
    my site is customized so logged in users are redirected to index.php

    I want to use the <?php wp_loginout(); ?> tag, unfortunatly it has no parameters, on a navbar in my header for users to login or out like following

    if user logged in the link would show---> logout(username)
    it would also show a link to---->profile.php

    If user isnt logged in----->login/register

    Seems simple enough but I have several problems, first I cant get <?php wp_loginout(); ?> to align properly with the other links (home, about, contact) it shows up under the menu.
    Second I cant call the username and display it next to logout
    I also have no idea how to call a link to profile.php if the user is logged in.

    any pointers to where code of this sort would exist would help, thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.