Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is there a buddypress conditional tag to show a user’s primary blog?

Viewing 1 replies (of 1 total)

  • Nahum
    Participant

    @nahummadrid

    this was working before 1.5

    `
    function my_blog(){
    global $bp;
    if ( !function_exists(‘bp_blogs_install’) )
    return false;

    if ( !$blogs = wp_cache_get( ‘bp_blogs_of_user_’ . $bp->displayed_user->id . ‘_inc_hidden’, ‘bp’ ) ) {
    $blogs = bp_blogs_get_blogs_for_user( $bp->displayed_user->id, true );
    wp_cache_set( ‘bp_blogs_of_user_’ . $bp->displayed_user->id . ‘_inc_hidden’, $blogs, ‘bp’ );
    }

    if ( is_array( $blogs ) && (int)$blogs ) {

    $blog=array_pop($blogs);//the first blog

    ?>

  • <a href="siteurl; ?>”>
  • <?php
    }
    }
    `
    I don’t recall now where I found it. If anyone knows how to fix for 1.5 that would be nice.

Viewing 1 replies (of 1 total)
  • The topic ‘Is there a buddypress conditional tag to show a user’s primary blog?’ is closed to new replies.
Skip to toolbar