The MU forums have moved to WordPress.org

Template Tags for Home Page? (11 posts)

  1. latitudes
    Member
    Posted 17 years ago #

    More specifically... I'm looking for the tag to get the path/url to the logged-in users's blog. I need to add a "view my blog" link to a user tools/navigation menu on the Home.php page

    Thanks!

  2. lunabyte
    Member
    Posted 17 years ago #

    That's been discussed in the forums quite a bit.

  3. dsader
    Member
    Posted 17 years ago #

    Try this in your sidebar
    <?php
    global $user_level;
    if ( isset($user_level) ) {
    echo "<h2>Your Blogs</h2>";
    $blogs = get_blogs_of_user($current_user->ID);
    if ( ! empty($blogs) ) foreach ( $blogs as $blog ) {
    echo "<li><a href='http://" . $blog->domain . $blog->path . "'>" . $blog->path . "</a></li>";
    }
    }
    ?>

  4. dsader
    Member
    Posted 17 years ago #

    oops double clicked submit

  5. latitudes
    Member
    Posted 17 years ago #

    Lunabyte: Indeed, but every post I found refered to wpmudev - which is lacking any api or template tag resources at the moment.

  6. andrea_r
    Moderator
    Posted 17 years ago #

    Because there aren't any built in tags for that. WPMUdev has plugins that will do things, which are called by things that look a lot like tags.

  7. latitudes
    Member
    Posted 17 years ago #

    tags or api functions -- doesn't make much difference to me. I just need examples or a code reference. Hopefully the'll get the API reference up and running soon. :) even a list of functions would be great - I can figure out what it does by then searching for the function in the code base.

  8. andrea_r
    Moderator
    Posted 17 years ago #

    I have no idea if anyone's even working on that. I do know, however, that there's a wpmu-functions file somewhere. :) The rest would be regular WP funtions.

  9. latitudes
    Member
    Posted 17 years ago #

    ooh, i'll give a look for that. i'm still not sure I understand how the user system works, andd how its strung together between blogs. Like... if I log in to My blog, and then go to to someone elses blog, does MU still recognise me a logged-in blogger (but just not an admin of that particular blog)?

  10. andrea_r
    Moderator
    Posted 17 years ago #

    Yep. :) Site-wide cookies.

  11. latitudes
    Member
    Posted 17 years ago #

    Thanks Andrea! I'm trying to parse the login process and user functions right now. my latest fumblings: http://wordpress.org/support/topic/100315?replies=1#post-497078

About this Topic

  • Started 17 years ago by latitudes
  • Latest reply from latitudes