Forums

Join
bbPress Support ForumsThemesShowing topics and posts by a given user

Info

Showing topics and posts by a given user

  1. Running bbPress with Buddypress.

    Whilst viewing a user's profile, I'd like to simply display topics and posts by a given user. I tried lifting this bit of code, but it returns nothing.

    Idears?

    <?php bbp_set_query_name( 'bbp_user_profile_topics_created' ); ?>
    <div id="bbp-author-topics-started" class="bbp-author-topics-started">
    	<div class="entry-content">
    		<?php if ( bbp_get_user_topics_started() ) :
    			bbp_get_template_part( 'bbpress/pagination', 'topics' );
    			bbp_get_template_part( 'bbpress/loop',       'topics' );
    			bbp_get_template_part( 'bbpress/pagination', 'topics' );
    		else : ?>
    			<p><?php bbp_is_user_home() ? _e( 'You have not created any topics.', 'bbpress' ) : _e( 'This user has not created any topics.', 'bbpress' ); ?></p>
    		<?php endif; ?>
    	</div>
    </div><!-- #bbp-author-topics-started -->
  2. This will happen automatically in the next release of both. If your code above literally returns "nothing" then it isn't even being executed, since you should at least see feedback about there being no topics. If you do at least see that feedback, then the problem lies in bbp_get_user_topics_started(). Check out how it works and see if there is anything broken.

    Worst case scenario, you can call your own WP_Query loop and display them yourself.

  3. It's returning "This user has not created any topics."

    Is there anything I can do in the mean time to get those functions to work (apart from a manual query)?

    :)

    Thanks!

  4. You must log in to post.