BuddyPress Toolbar
There’s actually an entire API for adding/removing items in the Toolbar. You’re specifically looking for the add_menu() method.
There’s actually an entire API for adding/removing items in the Toolbar. You’re specifically looking for the add_menu() method.
You should state which versions of WP and BP you’re using. This should change the content part of what is recorded. You can put it in your theme’s functions.php add_filter( ‘bp_blogs_activity_new_post_content’, ‘record_post_activity_content’, 1, 3 ); function record_post_activity_content($activity_content, $post, $post_permalink ){ if( $post->post_type == ‘post’ ) { $activity_content=”your custom field”; } return $activity_content; }
First, actions added to plugins_loaded hook will not work from theme functions.php or any theme file because at that point it will be already fired (too late from theme files). What you can do is to hook your action into after_setup_theme and unload buddypress text domain first and then add your custom buddypress text domain … Read more
You can pass the user id in Bp Profile loop to get hold of alll the fields and their values. <?php if ( bp_has_profile(array(‘user_id’ => 1)) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <ul id=”profile-groups”> <?php if ( bp_profile_group_has_fields() ) : ?> <li> <?php bp_the_profile_group_name() ?> <ul id=”profile-group-fields”> <?php while ( bp_profile_fields() ) … Read more
There are more problems: 1) Add the activity on adding meeting You could use the save_post hook to add activity, but I’d rather add custom notification, as the activity item can be easily missed. The how to is described in this great tutorial https://webdevstudios.com/2015/10/06/buddypress-adding-custom-notifications/ 2) Let the users view the post You should save post_meta … Read more
First of all, there is only 1 $accepted_args, not 3, so the add_action is: add_action(‘bp_activity_after_save’, ‘where_activity_from’, 10, 1); Second, the value in your tags input is never parsed by BP_Activity_Activity->save() so how could it be part of the array available thru the hook? Try using the $_POST array, like this: add_action(‘bp_activity_after_save’, ‘where_activity_from’, 10, 1); function … Read more
There is actually a plugin for that (bptemplate pack). It works pretty well! http://wordpress.org/extend/plugins/bp-template-pack/
BuddyPress themes are WordPress themes, plus extra templates. I encourage you to use the BuddyPress Template Pack plugin to enable these extra templates: http://wordpress.org/extend/plugins/bp-template-pack/ Here’s a bit of background on how to build a BP-compatible child theme: http://codex.buddypress.org/theme-development/bp-template-pack-walkthrough-level-easy-2/ This link actually uses TwentyTen as an example: http://codex.buddypress.org/theme-development/theme-dev-bp-template-pack-walkthrough-twenty-ten-bp-1-5/
After getting all the groups_ids i get all activities_ids by doing: <?php global $bp,$wpdb; $groups_ids = implode(‘, ‘, $groups_ids); $sql = “SELECT id FROM {$bp->activity->table_name} WHERE component=”groups” AND item_id IN ({$groups_ids})”; $activity_ids = $wpdb->get_results( $sql); $a_id = array(); foreach ($activity_ids as $activity_id ) { $a_id[] = $activity_id->id; } ?> Then i get only one activity … Read more
You should create it. you can find the schema in /wp-admin/includes/schema.php file. While it is used by core only in network mode, BP always uses it to track registration requests.