Search Results for 'buddypress'
-
Search Results
-
Hi all,
I’m new to Buddypress and it looks like a great component. I only struggle to adapt the description of the groups. The editor is super basic and it doesn’t really allow to adapt the description. What I want to do is different groups per region where people can put in a map a spot where they want to meet up, e.g. here for the city of Freiburg: Freiburg Gruppe
So basically I’d like people to put in a description of the group and then based on their location there should be an iframe for Google Maps) integrated.Can someone help or provide a hint on how to embedd an iframe and adapt the description a bit?
Thanks all in advance,
AnnaI tried rank math , yoast and Buddypress XML Sitemap Generator, none of them works.
Any solution?Hi, is it possible to disable those actions altogether?
Our site will be a members directory where the user will register and buy a membership and they will be added to a specific membership group we don’t want users to leave the group.
I saw a post from 9 years ago but didn’t get any answer.
This is the code the user mentioned:
if ( $group->is_member ) { // Stop sole admins from abandoning their group $group_admins = groups_get_group_admins( $group->id ); if ( 1 == count( $group_admins ) && $group_admins[0]->user_id == bp_loggedin_user_id() ) return false; $button = array( 'id' => 'leave_group', 'component' => 'groups', 'must_be_logged_in' => true, 'block_self' => false, 'wrapper_class' => 'group-button ' . $group->status, 'wrapper_id' => 'groupbutton-' . $group->id, 'link_href' => wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ), 'link_text' => __( 'Leave Group', 'buddypress' ), 'link_title' => __( 'Leave Group', 'buddypress' ), 'link_class' => 'group-button leave-group', );This code can do what I need? If so, how can I use this code? I tried with Code Snippets and it didn’t work.
Wordpress 6.0.0
Buddypress 10.3.0Hello,
I created a new page “Directory” and set it as the member’s directory in Buddypress pages configuration. Now when I dump the $post variable on this page, the $post->ID is equal to 0. It looks like the $post object doesn’t really represent the page I created.
What I’d like to know is, is this a normal behavior for Buddypress’ pages?object(WP_Post)#10833 (29) { ["ID"]=> int(0) ["post_author"]=> int(0) ["post_date"]=> int(0) ["post_date_gmt"]=> string(19) "2022-06-09 20:35:07" ["post_content"]=> string(0) "" ["post_title"]=> string(26) "Directory" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(6) "closed" ["ping_status"]=> string(6) "closed" ["post_password"]=> string(0) "" ["post_name"]=> string(10) "directory" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2022-07-12 16:15:11" ["post_modified_gmt"]=> string(19) "2022-07-12 14:15:11" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(25) "http://wpbuddypress.test/members/" ["menu_order"]=> int(0) ["post_type"]=> string(4) "page" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" ["is_404"]=> bool(false) ["is_page"]=> bool(true) ["is_single"]=> bool(false) ["is_archive"]=> bool(false) ["is_tax"]=> bool(false) }Hi I wanted to register a REST field for the Activity Endpoints to get the username of the activity post creator, but I didn’t know how to implement it, I pasted this code in the function.php, but I’m not getting anything back, any help please where this piece of code should be put? Which function.php and how to return the username any help or guidance please
<?php // Registers a REST field for the Activity Endpoints. function example_register_activity_rest_field() { bp_rest_register_field( 'activity', // Id of the BuddyPress component the REST field is about 'example_field', // Used into the REST response/request array( 'get_callback' => 'example_get_rest_field_callback', // The function to use to get the value of the REST Field 'update_callback' => 'example_update_rest_field_callback', // The function to use to update the value of the REST Field 'schema' => array( // The example_field REST schema. 'description' => 'Example of Activity Meta Field', 'type' => 'string', 'context' => array( 'view', 'edit' ), ), ) ); } add_action( 'bp_rest_api_init', 'example_register_activity_rest_field' ); /** * The function to use to get the value of the REST Field. * * @param array $array The list of properties of the BuddyPress component's object. * @param string $attribute The REST Field key used into the REST response. * @return string The value of the REST Field to include into the REST response. */ function example_get_rest_field_callback( $array, $attribute ) { // The key of the metadata can be different from the REST Field key. $metadata_key = '_example_metadata_key'; return bp_activity_get_meta( $array['id'], $metadata_key ); } /** * The function to use to update the value of the REST Field. * * @param object $object The BuddyPress component's object that was just created/updated during the request. * (in this case the BP_Activity_Activity object). * @return string $value The value of the REST Field to save. * @param string $attribute The REST Field key used into the REST response. */ function example_update_rest_field_callback( $object, $value, $attribute ) { // The key of the metadata can be different from the REST Field key. $metadata_key = '_example_metadata_key'; bp_activity_update_meta( $object->id, $metadata_key, $value ); }Hello,
I want to create multiple members pages based on field value.
For example let’s say I have a field called “Team” and values are 1,2 and 3.
I want to create a members page for each teams showing team members.
I found this code to create a function that will filter based on the field value :
function my_custom_ids( $field_name, $field_value = '' )I fount it HERE
I understood I need to add this code in my-theme/functions.php or in bp-custom.php but after that how can I call this function on the 3 different pages with the 3 different fields values ??
The code on the three pages will be like that if I understood well :
<?php if ( bp_has_members( my_custom_ids( 'Team', '1' ) ) ) : ?>
<?php if ( bp_has_members( my_custom_ids( 'Team', '2' ) ) ) : ?>
<?php if ( bp_has_members( my_custom_ids( 'Team', '3' ) ) ) : ?>I missed something, I really don’t know where to put the code that call the created function on the new page I created :/
Thank you for your help
Hey, do you know if it is possible to synchronize Memberpress custom registration fields of specific membership with BuddyPress custom profile fields?
For example, a Memberpress Business Name registration field is only available for a Business Membership with a Business Name BuddyPress field.
Hi!
The following message is displayed in d”ebug mode:Notice: Undefined variable: is_http_auth_req in /home/lceet/public_html/wp-content/plugins/buddypress-member-types/includes/buddyboss-plugin-updater.php on line 73
A solution?
Many thanks for the helpWordPress version: 6.0.1 (this error also occurred when using 6.0)
BuddyPress version: 10.3.0
Site: https://edrmstaging.wpengine.comI have verified that the error occurs even when using Twenty Twenty (normally we have a different theme in use), and that the error appears to be fixed by deactivating BuddyPress.
After updating to PHP 8.0, this fatal error is triggered when attempting to add a new WordPress post or duplicating an existing post:
PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /nas/content/live/edrmstaging/wp-content/plugins/buddypress/bp-core/classes/class-bp-rest-components-endpoint.php:102\nStack trace:\n#0 /nas/content/live/edrmstaging/wp-includes/rest-api/class-wp-rest-server.php(1143): BP_REST_Components_Endpoint->get_items(Object(WP_REST_Request))\n#1 /nas/content/live/edrmstaging/wp-includes/rest-api/class-wp-rest-server.php(990): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/buddypress/v1/...', Array, NULL)\n#2 /nas/content/live/edrmstaging/wp-includes/rest-api.php(519): WP_REST_Server->dispatch(Object(WP_REST_Request))\n#3 /nas/content/live/edrmstaging/wp-includes/rest-api.php(2868): rest_do_request(Object(WP_REST_Request))\n#4 [internal function]: rest_preload_api_request(Array, '/buddypress/v1/...')\n#5 /nas/content/live/edrmstaging/wp-includes/block-editor.php(601): array_reduce(Array, 'rest_preload_ap...', Array)\n#6 /nas/content/live/edrmstaging/wp-admin/edit-form-blocks.php(75): block_editor_rest_api_preload(Array, Object(WP_Block_Editor_Context))\n#7 /nas/content/live/edrmstaging/wp-admin/post-new.php(72): require('/nas/content/li...')\n#8 {main}\n thrown in /nas/content/live/edrmstaging/wp-content/plugins/buddypress/bp-core/classes/class-bp-rest-components-endpoint.php on line 102, referer: https://edrmstaging.wpengine.com/wp-admin/?wpengine_php=8.0The contents of line 102 of buddypress/bp-core/classes/class-bp-rest-components-endpoint.php are:
$active_components['core'] = $components['core'];Please let me know what I should try. I’m happy to test code fixes but I don’t know how to edit this line correctly. Thank you.