WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] URL to current user site. (2 posts)

  1. Geofeedz
    Member
    Posted 4 years ago #

    I would like to redirect users to their sites after they click a link.
    Therefore a user logs-in on the main site and then click "MY SITES" link and get directed to there Admin or site.
    EXAMPLE: usersite.mainsite.com/wp-admin
    I am thinking it should be currentuserinfo, but I do not see any argument for it.
    Any help is appreciated. Thank you.

  2. Geofeedz
    Member
    Posted 4 years ago #

    OK I figured it out.

    <?php global $current_user; get_currentuserinfo(); ?>
         $businesslink = <a href="http://<?php  echo( $current_user->source_domain ); ?>/wp-admin/">My Site</a>

    if anyone needs to do this.

Topic Closed

This topic has been closed to new replies.

About this Topic