Forums

Make /blog show individual user's blogs? (6 posts)

  1. yangers101
    Member
    Posted 5 months ago #

    I have WPMU 2.8.4a. Does anyone know how to make it so that http://www.myurl.com/blog shows the logged in user's blog(s). Currently /blog just shows the admin's blog. I would like to make it so that when the user logs in and clicks the "Blog" tab (/blog), he/she can see his/her blog. Your help would be much appreciated!!!! Thank you!!!

  2. dsader
    Member
    Posted 5 months ago #

    global $current_user;
    $primary_blog = get_active_blog_for_user( $current_user->ID );
    $url = 'http://'.$primary_blog->domain . $primary_blog->path.';

    Then your blog tab will have something like this:
    <a href="<?php echo $url; ?>">Blog</a>

  3. yangers101
    Member
    Posted 5 months ago #

    Hi dsader, thanks for your comment. I'm kind of a novice at coding...Could you explain which file I would put the code? Thanks!

  4. dsader
    Member
    Posted 5 months ago #

    Whatever file generates your "blog" tab. How could I know what your template files look like?

  5. andrea_r
    Member
    Posted 5 months ago #

    Your blog header is in the THEME template files.

  6. dsader
    Member
    Posted 5 months ago #

    Sorry, yangers101 my post sounded rude. My bad.

Reply

You must log in to post.

About this Topic

Tags