Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to Show a Member’s Blog Post Count on their Profile?


  • Nahum
    Participant

    @nahummadrid

    I’ve been trying this but it doesn’t quite work correctly. Can someone lend some ideas as to how to make something like this work on a member’s profile page sidebar. It’s the getting of the blogid and passing it thru the switch_to that is stumping. This is assuming that the member only has 1 blog and is the admin of it because that is the setup, 1 blog per 1 user. Is there something that exist out there that does this?

    <?php
    global $wpdb, $bp;
    $details = get_active_blog_for_user( bp_displayed_user_id() );
    $blogid = $details->blog_id;
    $blogposts = $details->post_count;
    
    ?>
    
    <li> 0)<img src="smileys/confuse.gif" width="" height="" alt=":?" title=":?" class="bbcode_smiley" />><?php echo count_user_posts( bp_displayed_user_id());
    
    ?> 0 <div class="statheading">My  Posts</div></li>
    
    
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to Show a Member’s Blog Post Count on their Profile?’ is closed to new replies.
Skip to toolbar