bp_has_members with custom fields [closed]

Buddypress’ bp_has_members() function accepts several parameters to alter the output. Take a look at the Accepted Parameters section on the codex page regarding the members loop. The two parameter meta_key and meta_value might just be what you’re looking for. The Code Examples section should give you an additional insight in how to do it – … Read more

Dequeue script to prevent javascript event conflict on wordpress child theme

First of all, to resolve the javascript conflict I’ve set up a simple tl_custom.js under my theme js/ folder, with the following code jQuery(document).ready(function($) { // Remove handler set by themes/Divi/js/custom.js at line 2642 $( ‘a[href*=#]:not([href=#])’ ).off(); }); Then I add the script with the following code in functions.php function tl_custom_scripts() { if ( ! … Read more

Search buddypress groups with querystring in url

Not in the url, but you can pass other parameters in the groups loop. There is a search_terms parameter in bp_has_groups(). It also has an orderby parameter that accepts total_member_count as the property. Assuming the tag info is stored in group_meta, you can add a meta_query parameter to the bp_has_groups(). More info from the BuddyPress … Read more

Save buddypress xprofile data to author meta

Use this action hook found in buddypress/bp-xprofile/classes/class-bp-xprofile-profiledata.php do_action_ref_array( ‘xprofile_data_after_save’, array( $this ) ); You’ll need to use the actual field_id for your xprofile description. This example assumes it is 25. You can get the field_idby going to wp-admin > Users > Profile Fields and clicking ‘Edit’ on that field. The field_id will appear in the … Read more

Fire curl command everytime new user is created

//This action hook allows you to access data for a new user immediately after they are added to the database. The user id is passed to hook as an argument. do_action( ‘user_register’, $user_id ); so you could: add_action(‘user_register’,’my_user_register_function’); function my_user_register_function($user_id) { $user = get_user_by( ‘ID’, $user_id ); //your CURL stuff }