how to remove header from registration page? [closed]

If you don’t mind editing your themes files, you can remove color.css from the registration page by editing the functions.php file and change line 127 from: wp_enqueue_style( ‘frisco-color-css’); to: if ( ! is_page( ‘register’ ) ) wp_enqueue_style( ‘frisco-color-css’); Otherwise you can include a function in a plugin or similar: add_action( ‘init’, function() { if ( … Read more

Change Buddypress Activity Stream Date format [closed]

The two filters you’re looking for are (source): bp_activity_time_since bp_activity_permalink To modify the date format, you could probably use the bp_core_time_since_pre filter to bypass BuddyPress’s time_since calculations (source). Alternatively, you could completely override (i.e. replace) the activity meta output with the bp_insert_activity_meta filter

Buddypress Language Files Question [closed]

The naming convention for plugins translation files (.mo and .po files) is pluginname-language_COUNTRY.mo. So, for example, a French translation files of Buddypress will be: buddypress-fr_FR.mo and buddypress-fr_FR.po. After renaming these files, put them in wp-content/languages directory and your translation should work. Note that WP_LANG must be defined with the same language (fr_FR for example) for … Read more

How to: get_user_meta – BuddyPress [closed]

Inside the loop, you can get the currently iterated user id using bp_get_member_user_id(). Also, it’s best practice to use bp_get_user_meta(), because it works better with certain kinds of BP plugins (multi-network, etc). Thus: if ( bp_has_members() ) { while ( bp_members() ) { bp_the_member(); $user_last = bp_get_user_meta( bp_get_member_user_id(), ‘last_name’, true ); } }

How to send a BuddyPress user a notification on a plugin event? [closed]

First you need to setup component for this: function notifier_setup_globals() { global $bp, $current_blog; $bp->notifier = new stdClass(); $bp->notifier->id = ‘notifier’; $bp->notifier->slug = ‘notifier’; $bp->notifier->notification_callback = ‘bp_notifier_format_notifications’;//this is a function which gets notifications $bp->active_components[$bp->notifier->id] = $bp->notifier->id; do_action( ‘notifier_setup_globals’ ); } add_action( ‘bp_setup_globals’, ‘notifier_setup_globals’ ); To add notifications call something like this inside your action: bp_core_add_notification( … Read more

Buddypress – adding profile fields to Group > Members directory [closed]

Try the following function, which is the one i use: xprofile_get_field_data(‘Profile’,$u_id); $u_id is the user ID in case you are not in a members loop. So in your case should be: <?php if ( xprofile_get_field_data( ‘Profile’, $user_ID ) ) : ?> <?php echo ‘<BR><span class=memberslabel>Profile:</span> ‘; ?> <?php echo xprofile_get_field_data( ‘Profile’, $user_ID ); ?> <?php … Read more

Buddypress get data from wp_bp_groups_members table [closed]

Simpler solution: function get_relationship($group_id,$user_id) { global $wpdb; $relationships = $wpdb->get_col(“SELECT relationship FROM wp_bp_groups_members WHERE group_id = $group_id AND user_id = $user_id”); if ( !empty( $relationships ) ) { foreach ( $relationships as $relationship ) { return $relationship; } } } And it should go in plugins/bp-custom.php or your-theme/functions.php. Not bp-groups-template.php, which is a core file … Read more

Buddypress – Add activity scope [closed]

What you want is something like the below class, provided in a gist by @boone-gorges. The code is for extending the groups stream with some tabs matching groupmeta. Code: /** * This is a quick and dirty class to work around the fact that bp_has_groups() does not have a * meta_query parameter (or even an … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)