Skip to:
Content
Pages
Categories
Search
Top
Bottom

Filter groupsby slug?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of dcavins
    dcavins
    Participant

    @dcavins

    Hi Jon-

    You’ve probably already solved this, but I’m thinking you’re going to need top attach some meta to the groups, then use the very cool new group meta filter for bp_has_groups(). The group loop might look like:

    $args = array( 
    		'meta_query' => array(
    			array(
    				'key' => 'meta_key',
    				'value' => 'value_1',
    				'compare' => 'LIKE',
    			)
    		) 
    	);
    
    	if ( bp_has_groups ( $args ) ) { //...

    Here’s an example of writing a plugin to collect group meta: http://codex.buddypress.org/plugindev/how-to-edit-group-meta-tutorial/

    Good luck!

    Avatar of jonzlin95
    jonzlin95
    Participant

    @jonzlin95

    Hey Dcavins,

    Thanks for the reply. I found that and implemented the functionality, but now on my groups directory pages, the Search and Order By functionality are broken. Do you know how we can fix this?

    Thanks in advance
    -Jon

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

You must be logged in to reply to this topic.