Skip to:
Content
Pages
Categories
Search
Top
Bottom

Showing topics and posts by a given user


  • ben_allison
    Member

    @ben_allison

    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 -->

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

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    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.


    ben_allison
    Member

    @ben_allison

    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!


    nekstrebor
    Participant

    @nekstrebor

    I am using bbPress only…

    under a users profile, I can see a count of the number of topics and replies but it doesn’t list them. The only way I can see them listed is if I am logged in as admin.

    Please help 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar