Skip to:
Content
Pages
Categories
Search
Top
Bottom

Loops Reference

Published on February 28th, 2012 by Andy Peatling

Just as you use “The Loop” to loop through posts in WordPress, each content type in BuddyPress has its own custom loop. By using these loops in your template, you can output any kind of information and really customize how content is displayed within your BuddyPress theme. The default BuddyPress template files makes use of […]

Forum Topics Loop

Published on May 17th, 2010 by r-a-y

The forum topics loop can be used to output a list of forum topics. Standard Loop Accepted Parameters The bp_has_forum_topics() function will accept a number of parameters that will manipulate the data being returned. type optional List forum topics by type. Accepted arguments: newest,popular,unreplied,tags (if type equals “tags”, define the “search_terms” argument and list the […]

Profile Fields Loop

Published on April 29th, 2009 by Andy Peatling

The profile data loop is the most complex out of all the custom BuddyPress loops. It’s actually two loops in one, the first is to loop through profile field groups, and the second to loop through profile fields in that profile field group. Standard Loop Accepted Parameters The bp_group_has_profile() function will accept a number of […]

Private Messages Loop

Published on April 29th, 2009 by Andy Peatling

The private messages loop can be used to output a user’s private messages, both from their inbox and sentbox. Standard Loop Accepted Parameters The bp_has_message_threads() function will accept a number of parameters that will manipulate the data being returned. user_id optional The ID of the user to fetch messages for. By default this will be […]

Group Members Loop

Published on April 29th, 2009 by Andy Peatling

The group members loop can be used to display members that have joined a group. It can be used nested inside the bp_has_groups() loop, or on its own with a group_id parameter. Standard Loop Accepted Parameters The bp_group_has_members() function will accept a number of parameters that will manipulate the data being returned. group_id required The […]

Blogs Loop

Published on April 29th, 2009 by Andy Peatling

NOTE: This will only work with an installation of BuddyPress and WordPress MU or WordPress with multisite enabled. The site blogs loop can be used to output a list of blogs that have been created on your installation. Standard Loop Accepted Parameters The bp_has_blogs() function will accept a number of parameters that will manipulate the […]

Groups Loop

Published on April 29th, 2009 by Andy Peatling

The site groups loop can be used to output a list of groups created on your site. Standard Loop Accepted Parameters The bp_has_groups() function will accept a number of parameters that will manipulate the data being returned. type optional Defines the type of groups to return. Accepted arguments: active, newest, popular, random, alphabetical, most-forum-topics, most-forum-posts […]

Members Loop

Published on April 28th, 2009 by Andy Peatling

The site members loop can be used to output a list of users that are registered on your site. Standard Loop Accepted Parameters The bp_has_members() function will accept a number of parameters that will manipulate the data being returned. type optional Defines the type of users to return. Accepted arguments: active, newest, popular, online, alphabetical, […]

Activity Loop

Published on April 28th, 2009 by Andy Peatling

The activity loop can be used to output a list of sitewide, member or member’s friends activity. Standard Loop Accepted Parameters The bp_has_activities() function will accept a number of parameters that will manipulate the data being returned. scope optional Pre-defined filtering of the activity stream. Show only activity for the scope you pass (based on […]