Dynamic Linking for Multisite?

Hey guys,
I want to create a 'getting started' page for new users. I want to have two links on the page, one that links to their website and one that links to their admin section.
Is this possible?

Also is it possible to use this page after they have activated their account. Instead of the un-styled wp version?

Cheers.
kc.

  • aristath
    • Recruit

    Hello there @Kc, I hope you're well today!

    I want to create a 'getting started' page for new users. I want to have two links on the page, one that links to their website and one that links to their admin section.
    Is this possible?

    It's possible... but will require some custom coding.
    This will help get you started:

    $current_user = wp_get_current_user();
    $user_id = $current_user->ID;
    $user_blogs = get_blogs_of_user( $user_id );
    
    foreach ( $user_blogs AS $user_blog ) :
      echo '<a href="' . $user_blog->path . '">' . $user_blog->blogname . '</a>';
    endif;

    I hope that helps!

    Cheers,
    Ari.

  • aristath
    • Recruit

    So i would put this into a new Page Template?

    I'm afraid that the above code is pretty useless on its own.
    You will have to completely custom-code a template file for this... that code is just a simple of what you can use to get the blogs owned by the current user an display a link to them.

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.