WordPress.org

Ready to get started?Download WordPress

Forums

link from the dashboard to the public profile page (3 posts)

  1. nickrita
    Member
    Posted 6 years ago #

    How do I make a link from the dashboard to the public profile page

    We have an online-magazine (www.ci-jou.de) where registered users can publish their articles. For each user there is a public profile page (made by author.php) Mine is here: http://www.ci-jou.de/?author=3

    Now I would like to have a link from the dashboard to the public profile page.

    I tried the following on admin-header.php in file wp-admin:

    <a href="http://www.ci-jou.de/?author=$user_ID"><?php _e('Profilseite'); ?></a>

    But this does not work. It only shows the empty profile (author.php), but not with the data of the user.

    I think I have to write something different than $user_ID, but I don’t really know what.

    I also tried it with the template tag <?php the_author_posts_link(); ?>
    But this doesn’t work either.

    Hope anyone can help.

    Songline

  2. Kafkaesqui

    Posted 6 years ago #

    Scope $user_ID to global first:

    <?php global $user_ID; ?>
    <a href="http://www.ci-jou.de/?author=$user_ID"><?php _e('Profilseite'); ?></a>
  3. nickrita
    Member
    Posted 6 years ago #

    Kafkaesqui, thanks, for the code, but this doesn't work either. There is still just shown the empty profile without the data of the logged-in user.

Topic Closed

This topic has been closed to new replies.

About this Topic