Search Results for 'profile fields'
-
Search Results
-
I seem to have lost the template message that shows if the profile has been successfully saved.
I have a custom function that runs on the following:
add_action( ‘xprofile_updated_profile’, ‘syncbuddypresstoacf’ ); would this be making my saved and any custom errors not display when it is being saved?
There is no priority on this action.
I’m able to see the error messages relating to missing required fields, but that is allHi can anyone help I have a problem with the extended base group profile fields on 2 profiles the profile field boxes are fine and display full length but on the newest members profile fields seem to be displaying in a small box and aligned over to the right of the page not as wide as my admin profile fields or one of the other user profiles iv’e tried a search and found a code to over ride the CSS but it hasn’t worked i’m using the latest version of BuddyPress and my website is http://thattuneuk.com I hope someone knows how to fix this problem as iv’e been racking my brains for a couple of days trying to sort it out.
I’m creating a custom page that shows all members of a specific group.
I need to make a box for each member that includes their avatar, name, and the data from one of the custom xProfile fields I’ve created for the community.I used the group_members loop and I have the avatar and name working.
‘<?php if ( bp_group_has_members(‘group_id=1’) ) : ?>
<ul id=”member-list” class=”item-list”>
<?php while ( bp_group_members() ) : bp_group_the_member(); ?>- <?php bp_group_member_avatar_mini($width = 50, $height = 50) ?>
<?php bp_group_member_link() ?><?php endwhile; ?>
<?php else: ?>
<div id=”message” class=”info”>
<p>Something went wrong!</p>
</div>
<?php endif;?>’I don’t know how to access the xProfile field I want so I can add it to the loop. I know the profile group_id=1 and the profile field_id=9, but I can’t find anywhere how the profile field_id is linked to a members user_id, so I can’t figure out how to add it to the group_members loop. I think it should look something like this:
‘<?php
function bp_group_member_location() {
echo bp_get_group_member_location();
}function bp_get_group_member_location() {
global $members_template;
// Write code here to return the value of profile group_id=1&field_id=9 for member
}
?>’But I don’t know if I should even be looking for the custom profile fields data in the $member_template (which I can’t actually find to see what it does contain)
Any advice or suggestions would be greatly appreciated, even if it’s just to let me know I’m completely off… I am a beginner and this is my first post here. Please comment if you need more info to be able to answer my question. (I am using BP 2.7.2 and WP 4.6.something)
Thanks in advance!
We are hosting our blog in a subdirectory (https://domain.com/blog/), not a subdomain (https://blog.domain.com). We are fetching content behind reverse proxy from server B.
Users cannot upload their buddy-press profile avatar.
Here is header
Request URL:http://www.example.com/wp-admin/admin-ajax.php
Request Method:POST
Status Code:302 Moved Temporarily.
I tried following code$.ajaxPrefilter(function(options){
options.xhrFields={
withCredentials: true
};
});
Your help will be greatly helpful. I already setup header for other ajax call toheaders[‘Access-Control-Allow-Origin’] = “*”
Can anymore provide some guidance on hiding BuddyPress user profile fields and custom tabs from non-logged in users?
I’ve been trying to figure out how to prevent non-logged in users from viewing my BuddyPress pages, but I can’t seem to quite make everything work. So far, I’ve been able to figure out how to restrict access to the Members page and redirect non-logged in users to the login page. I put the following code in my bp-custom.php file, which is in my plugins folder. I got the code from this BuddyPress forum page (https://buddypress.org/support/topic/hiding-groups-activity-members-list-to-non-members/).
<?php /** * Change BuddyPress default Members landing tab. */ define('BP_DEFAULT_COMPONENT', 'profile' ); /* Prevent logged out users from accessing bp activity page */ function nonreg_visitor_redirect() { global $bp; if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bp_is_page( BP_MEMBERS_SLUG ) ) { if(!is_user_logged_in()) { //just a visitor and not logged in wp_redirect( get_option('siteurl') . '/wp-login.php' ); } } } add_filter('get_header','nonreg_visitor_redirect',1); ?>However, non-logged in users can still view each user’s page and their profile tabs. How can I restrict access to those pages as well? I’d rather not use another plugin.
(Latest version of WP/BP; non-bundled custom theme, using child theme.)
When adding a custom index & members-loop to /members/ in my child-theme, to make some adjustments to the members directory layout, individual profile pages break completely, I think defaulting to the pages.php but loaded without any content.
childtheme/members/members-loop.php
<?php //global $members_template; //$reset_members_template = $members_template; do_action( 'bp_before_members_loop' ); ?> <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&per_page=21&type=alphabetical' ) ) : ?> <div id="pag-top" class="pagination"> <div class="pag-count" id="member-dir-count-top"><?php bp_members_pagination_count(); ?></div> <div class="pagination-links" id="member-dir-pag-top"><?php bp_members_pagination_links(); ?></div> </div> <?php do_action( 'bp_before_directory_members_list' ); ?> <ul id="members-list" class="item-list" role="main"> <?php while ( bp_members() ) : bp_the_member(); ?> <li> <div class="item-avatar"> <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar('type=full&width=80&height=80'); ?></a> </div> <div class="item"> <div class="item-title"><a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a></div> <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div> <?php do_action( 'bp_directory_members_item' ); ?> </div> <div class="action"> <?php do_action( 'bp_directory_members_actions' ); ?> </div> <div class="clear"></div> </li> <?php endwhile; ?> </ul> <?php do_action( 'bp_after_directory_members_list' ); ?> <?php bp_member_hidden_fields(); ?> <div id="pag-bottom" class="pagination"> <div class="pag-count" id="member-dir-count-bottom"><?php bp_members_pagination_count(); ?></div> <div class="pagination-links" id="member-dir-pag-bottom"><?php bp_members_pagination_links(); ?></div> </div> <?php else: ?> <div id="message" class="info"><p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p></div> <?php endif; //$members_template = $reset_members_template; ?> <?php do_action( 'bp_after_members_loop' ); ?>childtheme/members/index.php
<?php /** * BuddyPress - Members Directory * * @package BuddyPress * @subpackage bp-default - SSSMG */ get_header( 'buddypress' ); ?> <?php do_action( 'bp_before_directory_members_page' ); ?> <div class="container"> <div class="row"> <div id="primary" class="col-md-10"> <div id="content" role="main" class="<?php do_action( 'content_class' ); ?>"> <div class="padder"> <div class="buddypress"> <?php do_action( 'bp_before_directory_members' ); ?> <form action="" method="post" id="members-directory-form" class="dir-form"> <?php do_action( 'bp_before_directory_members_content' ); ?> <div id="members-dir-search" class="dir-search" role="search"> <?php bp_directory_members_search_form(); ?> </div><!-- #members-dir-search --> <?php do_action( 'bp_before_directory_members_tabs' ); ?> <div class="item-list-tabs" role="navigation"> <ul> <li class="selected" id="members-all"><a href="<?php bp_members_directory_permalink(); ?>"><?php printf( __( 'All Members %s', 'buddypress' ), '<span>' . bp_core_get_total_member_count() . '</span>' ); ?></a></li> <?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> <li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/'; ?>"><?php printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' ); ?></a></li> <?php endif; ?> <?php do_action( 'bp_members_directory_member_types' ); ?> </ul> </div><!-- .item-list-tabs --> <div id="members-dir-list" class="members dir-list"> <?php //bp_get_template_part( 'members/members-loop' ); locate_template( array( 'members/members-loop.php' ), true ); ?> </div><!-- #members-dir-list --> <?php do_action( 'bp_directory_members_content' ); ?> <?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?> <?php do_action( 'bp_after_directory_members_content' ); ?> </form><!-- #members-directory-form --> <?php do_action( 'bp_after_directory_members' ); ?> </div><!-- #buddypress --> </div><!-- .padder --> </div><!-- #content --> </div><!-- primary --> <?php get_sidebar( 'buddypress' ); ?> </div><!-- row --> </div><!-- container --> <?php do_action( 'bp_after_directory_members_page' ); ?> <?php get_footer( 'buddypress' ); ?>bp-custom.php
<?php // bp-custom.php - BP hacks and mods will go here /** * Include bbPress 'topic' custom post type in WordPress' search results */ function ntwb_bbp_topic_cpt_search( $topic_search ) { $topic_search['exclude_from_search'] = false; return $topic_search; } add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' ); /** * Include bbPress 'forum' custom post type in WordPress' search results */ function ntwb_bbp_forum_cpt_search( $forum_search ) { $forum_search['exclude_from_search'] = false; return $forum_search; } add_filter( 'bbp_register_forum_post_type', 'ntwb_bbp_forum_cpt_search' ); /** * Include bbPress 'reply' custom post type in WordPress' search results */ function ntwb_bbp_reply_cpt_search( $reply_search ) { $reply_search['exclude_from_search'] = false; return $reply_search; } add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' ); /** * Ensure that multiselect boxes have trailing brackets in their 'id' and 'name' attributes. * * These brackets are required for an array of values to be sent in the POST * request. Previously, bp_get_the_profile_field_input_name() contained the * necessary logic, but since BP 2.0 that logic has been moved into * BP_XProfile_Field_Type_Multiselectbox. Since bp-default does not use the * BP_XProfile_Field_Type classes to build its markup, it did not inherit * the brackets from their new location. Thus this workaround. */ function bp_dtheme_add_brackets_to_multiselectbox_attributes( $name ) { global $field; if ( 'multiselectbox' === $field->type ) { $name .= '[]'; } return $name; } add_filter( 'bp_get_the_profile_field_input_name', 'bp_dtheme_add_brackets_to_multiselectbox_attributes' ); // add the custom column headers to BP manage signups function philopress_modify_user_columns($column_headers) { $column_headers['extended'] = 'Extended'; return $column_headers; } add_action('manage_users_page_bp-signups_columns','philopress_modify_user_columns'); // dump all the pending user's meta data in the custom column function philopress_signup_custom_column( $str, $column_name, $signup_object ) { if ( $column_name == 'extended' ) return print_r( $signup_object->meta, true ); return $str; } add_filter( 'bp_members_signup_custom_column', 'philopress_signup_custom_column', 1, 3 ); //* Redirect WordPress Logout to Home Page add_action('wp_logout',create_function('','wp_redirect(home_url());exit();')); //add @mentions to bbpress forum function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) { if ( function_exists( 'bbpress' ) && is_bbpress() ) { $retval = true; } return $retval; } add_filter( 'bp_activity_maybe_load_mentions_scripts', 'custom_bbpress_maybe_load_mentions_scripts' ); function bphelp_dpioml(){ $bphelp_my_profile_field_1='Profession'; $bphelp_my_profile_field_2='Primary Institution'; if( is_user_logged_in() && bp_is_members_component() ) { ?> <div class="bph_xprofile_fields"> <?php if(bphelp_my_profile_field_1<>"") echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_1 ); ?><br /> <?php if(bphelp_my_profile_field_2<>"") echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_2 ); ?><br /> </div><?php } } add_action('bp_directory_members_item', 'bphelp_dpioml'); ?>I’ve tried all sorts of different combinations but whatever I do, the only way to get both the profile pages and the members directory to display is to remove the index and members-loop customizations. Then everything works fine, but without the adjustments to the members directory that I want (removing recent updates, for instance). Any pointers would be brilliant!
Topic: Profile Page and Bio
Hello
I have buddyPress 2.7.2 installed. I notice that in the profile section it does not have fields to fill other information except name and photo. When I press the edit tab it allows only to change name and there is a tab to change the photo.
I notice that in demos on other wordpress themes that have buddyPress, it shows fields such as Age, Bio. Are these fields deleted?
I am a newbie to WordPress and BuddyPressUsing BP2.7.1
My BP installation for some reason has two Base Primary tabs under Profile Fields. The First tab shows two Name (Primary) (Required) Fields and both of these show on my signup forms. The second tab has nothing on it.
I can’t see what is causing the issue but how do I get rid of them?
Thanks in anticipation.
Is there a way to require a profile pic upon registration? I cannot see the option to set up a field for that in the form fields, but would like to do this upon registration rather than having users have to do this on the profile editor later.
- <?php bp_group_member_avatar_mini($width = 50, $height = 50) ?>
