Forum Replies Created
-
In reply to: assign member types programatically
Can you be more specific? Which plugin you used?
Thank you
Yes, there is a plugin for this work: https://buddydev.com/plugins/bp-xprofile-member-type-field/
In reply to: duplicate group pageThank you for your suggestion. I didn’t know about this plugin!
In reply to: Duplicate activity/members/groups seperate languageI would also like to have some help to this topic.
I have the same problem. Two languages on my site using polylang! How can these buddypress pages be translated and work to the second language as well?
Thank you in advance!
In reply to: Exclude groups from get_total_group_countOk thank you!
In reply to: Exclude groups from get_total_group_countThank you, I don’t have to include hidden groups indeed!
One more question: What about bp_get_total_group_count_for_user?
How I can override this in order to exclude some groups from the count?
Andreas
In reply to: Exclude groups from get_total_group_countThank you for your answers and recommendations!
The custom function that I have written before, I suppose it does what I want very well. Am I right?
Here it is again.
function filter_bp_get_total_group_count() { global $wpdb; $hidden_sql = "WHERE slug not in ('health', 'social', 'cultury')"; $bp = buddypress(); return $wpdb->get_var( "SELECT COUNT(id) FROM {$bp->groups->table_name} {$hidden_sql}" ); };In reply to: Exclude groups from get_total_group_countI have done the same thing, if you read my post.
The question is about the function ‘my_group_count_filter’.
Do I have to use a simple and direct query to database like this one that my function has?
return $wpdb->get_var( "SELECT COUNT(id) FROM {$bp->groups->table_name} {$hidden_sql}"Or is there any other way to pass excluded groups to my counter?
Thank you!
Andreas
Yes, but how I will use wp_update_term function?
I have written this:
function example_update_category( $group_id ) {
$group = groups_get_group( array( ‘group_id’ => $group_id ) );
$name = $group->name;
$groupid = $group->id;wp_update_term(
189, //for a specific category item
‘category’,
array(
‘name’ => $name
)
);
}
add_action( ‘groups_details_updated ‘, ‘example_update_category’, 1, 1 );But it doesn’t seem to work. What is wrong? Hook maybe?
Thank you in advance!
Andreas
Is there any answer to this? How we will tell buddypres to change category name when a group name is edited?
Thank you much!
Regards,
Andreas
This works great! Thank you very much for your support.
When I choose to edit group and change, for example, the group name, of course category name doesn’t change. How can we do that?
Thank you in advance!
Regards,
Andreas
Did you find any solution with this?
I also have similar problem and want to use a category for each group creation..
Regards,
Andreas
In reply to: Filter profile page groups to my groups only