How can I insert a dynamic URL in my email template?

I have no experience with this plugin, but it looks like you can add extra template variables with a filter named ‘wpbe_tags’: function template_vars_replacement( $template ) { $to_replace = array( ‘blog_url’ => get_option(‘siteurl’), ‘home_url’ => get_option(‘home’), ‘blog_name’ => get_option(‘blogname’), ‘blog_description’ => get_option(‘blogdescription’), ‘admin_email’ => get_option(‘admin_email’), ‘date’ => date_i18n(get_option(‘date_format’)), ‘time’ => date_i18n(get_option(‘time_format’)) ); $to_replace = apply_filters(‘wpbe_tags’, … Read more

Slider’s missing navigation

WordPress loads jQuery in “No Conflict” mode. The $ alias does not work. This is the cause of most of the “jQuery doesn’t work” questions on this site. Your code is using that $ alias, despite the Codex warnings against doing so. Use jQuery.(document) or wrap your code like… (function($) { $(function() { // more … 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

is user member of a group, show them categories [closed]

You should probably try this plugin first: http://buddydev.com/buddypress/blog-categories-for-groups-plugin/ Or you could take some code from it and try to implement that yourself. Start with blog-categories-for-groups.php, and see the last few lines: //for single post screen function screen_group_blog_single_post(){ global $bp; if(function_exists(‘bp_is_group’)&&!bp_is_group()) return; //do not catch the request for creating new post if(bp_is_action_variable(‘create’,0)) return; $current_group=groups_get_current_group(); if(bcg_is_disabled($current_group->id)) return; … 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

Problems with redirecting a BuddyPress custom subnav item [closed]

You can force the link. Try: bp_core_new_subnav_item( array( ‘name’ => ‘Create Virtual Village’, ‘slug’ => ‘create’, ‘parent_url’ => ‘groups’, ‘parent_slug’ => ‘groups’, ‘screen_function’ => ‘false’, ‘position’ => 50, ‘link’ => get_option(‘siteurl’) . ‘/groups/create/step/group-details/’ ) );