Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to display user profile info inside wordpress author.php file


  • iTHINKSOLUTIONS
    Member

    @ithinksolutions

    I’m trying to create the author.php file inside wordpress to display user’s profile, latest blog posts and user’s forum activities. Using the snippet below just returns empty data for each user. I’m sure I’m missing something in the snippet and hopefully someone could point me to the right direction.

    <?php do_action( 'bbp_template_notices' );

    // Subscriptions
    bbp_get_template_part( 'bbpress/user', 'subscriptions' );

    // Favorite topics
    bbp_get_template_part( 'bbpress/user', 'favorites' );

    // Topics created
    bbp_get_template_part( 'bbpress/user', 'topics-created' );

    ?>

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

  • ryan360
    Participant

    @ryan360

    Bump. I’m also interested in this. Can anyone help?


    ryan360
    Participant

    @ryan360

    I was able to accomplish this by writing a custom query. I was unable to find a solution ANYWHERE else on this forum despite numerous people asking the same question so I’m hoping this will help everyone out until the bbpress team fixes the bbp_get_template_part functions.

    		<?php
        
                    $args = array(
                       'post_type' => 'reply',
                       'post_status' => 'publish',
                       'orderby' => 'title',
                       'order' => 'ASC',
                       'author' => $curauth->ID,
                    );
                    $bbpressquery = new WP_Query($args);
                    while ($bbpressquery->have_posts()) : $bbpressquery->the_post();
                ?>
                    
                    	<?php the_content(); ?>
                    	
              	 <?php endwhile; ?>   

    Obviously you can modify the code above to show topics created, I was just trying to return all the forum posts created by a user.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.