Skip to:
Content
Pages
Categories
Search
Top
Bottom

(Resolved) How to modify bp_has_forum_topics correctly?

  • Avatar of angslycke
    angslycke
    Participant

    @angslycke

    Hi everyone!

    I’ve built my first custom widget for BuddyPress which displays the latest three group forum topics. I want this widget to display the same topics regardless of which page the user is currently viewing. As the bp_has_forum_topics works, it automatically adjusts to viewing the current users forum topics when viewing a members page, and when viewing a specific group, it shows the group forum topics only for this group.

    I want to override the above values when viewing a specific group/member and have tried using the code below, but still the same default values are returned (thus when I view a group which has no forum posts, the widget shows “No forum topics found” and so on). I’m sure this is easy to fix, any ideas?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    You almost got it right!

    Parameters need to be either a querystring or an array.

    Try this:

    `3, ‘no_stickies’ => false, ‘forum_id’ => false, ‘user_id’ => false, ‘search_terms’ => false ) ) ) : ?>`

    Avatar of angslycke
    angslycke
    Participant

    @angslycke

    @r-a-y Thank you so much! That will be really useful to know when trying to modify things further.

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

You must be logged in to reply to this topic.