Search Results for 'display user role on profile page'
-
Search Results
-
Hi folks, I’ve tried searching for this but perhaps I can’t find the correct words to search.
I’m looking to make it possible, in edit profile, to add a profile field that allows the user to select other users of a certain role type or member type, and then they will display at their profile page with an avatar.
So if my users were all shops and products, with role or member type shop, and role or member type product, and I would like to allow shops to perhaps type into a multi-select box to pull up from the user database, the users in the role or member type products, and select them, and they would display on their page.
It’s kind of similar to a ‘relationships’ plugin but a bit more basic I guess. Can anyone point me in the right direction?Kind regards
I expect this is likely a configuration issue with either our BuddyPress installation, a conflict from another plugin (though it works on staging version), or perhaps a lingering cacheing issue. But looking to find assistance resolving it and willing to consider hired help on this.
No url to share, as it is a member’s only site (Intranet).
### wp-core ### version: 6.1.1 site_language: en_CA user_language: en_CA timezone: America/Vancouver permalink: /%year%/%monthnum%/%day%/%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 0 default_comment_status: open environment_type: production user_count: 431 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /home/susyah/public_html wordpress_size: 58.81 MB (61669230 bytes) uploads_path: /home/susyah/public_html/wp-content/uploads uploads_size: 62.25 MB (65272481 bytes) themes_path: /home/susyah/public_html/wp-content/themes themes_size: 23.15 MB (24279208 bytes) plugins_path: /home/susyah/public_html/wp-content/plugins plugins_size: 400.27 MB (419712905 bytes) database_size: 96.29 MB (100972517 bytes) total_size: 640.78 MB (671906341 bytes) ### wp-dropins (2) ### advanced-cache.php: true maintenance.php: true ### wp-active-theme ### name: Kleo Child (kleo-child) version: undefined author: SeventhQueen author_website: http://seventhqueen.com parent_theme: Kleo (kleo) theme_features: core-block-patterns, widgets-block-editor, editor-style, automatic-feed-links, post-formats, menus, post-thumbnails, html5, featured-content, title-tag, customize-selective-refresh-widgets, responsive-embeds, kleo-facebook-login, kleo-mega-menu, kleo-menu-items, bbpress, woocommerce, buddypress-use-nouveau, widgets theme_path: /home/susyah/public_html/wp-content/themes/kleo-child auto_update: Disabled ### wp-parent-theme ### name: Kleo (kleo) version: 5.1.2 author: SeventhQueen author_website: https://themeforest.net/user/SeventhQueen theme_path: /home/susyah/public_html/wp-content/themes/kleo auto_update: Disabled ### wp-themes-inactive (1) ### Twenty Twenty-Three: version: 1.0, author: the WordPress team, Auto-updates disabled ### wp-plugins-active (71) ### Admin Menu Editor Pro: version: 2.18.1, author: Janis Elsts, Auto-updates disabled AS Admin Customizer: version: 1.0, author: Andolasoft, Auto-updates disabled bbPress: version: 2.6.9, author: The bbPress Contributors, Auto-updates disabled bbp style pack: version: 5.4.1, author: Robin Wilson, Auto-updates disabled Better Notifications for WP: version: 1.9.2, author: Made with Fuel, Auto-updates disabled Big File Uploads: version: 2.1.1, author: Infinite Uploads, Auto-updates disabled BP Profile Search: version: 5.4.8, author: Andrea Tarantini, Auto-updates disabled Brozzme Multiple Admin Emails: version: 1.4, author: Benoti, Auto-updates disabled BuddyPress: version: 11.1.0, author: The BuddyPress Community, Auto-updates disabled BuddyPress Notifications Widget: version: 1.3.2, author: BuddyDev, Auto-updates disabled Classic Editor: version: 1.6.2, author: WordPress Contributors, Auto-updates disabled Display Posts: version: 3.0.2, author: Bill Erickson, Auto-updates disabled Document Library Pro: version: 1.9.4, author: Barn2 Plugins, Auto-updates disabled Duplicate Page: version: 4.5.1, author: mndpsingh287, Auto-updates disabled Envato Market: version: 2.0.8, author: Envato, Auto-updates disabled Essential Grid: version: 3.0.16, author: ThemePunch, Auto-updates disabled FileBird: version: 5.1.4, author: Ninja Team, Auto-updates disabled Force Login: version: 5.6.3, author: Kevin Vess, Auto-updates disabled GeoDirectory: version: 2.2.25, author: AyeCode - WordPress Business Directory Plugins, Auto-updates disabled Image Upload for BBPress: version: 1.1.18, author: Aspen Grove Studios, Auto-updates disabled Jetpack: version: 11.9.1, author: Automattic, Auto-updates disabled Jetpack Boost: version: 1.7.0, author: Automattic - Jetpack Site Speed team, Auto-updates disabled K Elements: version: 5.1.2, author: SeventhQueen, Auto-updates disabled K Fonts: version: 1.1.0, author: SeventhQueen, Auto-updates disabled Like Button Rating ♥ LikeBtn: version: 2.6.47, author: LikeBtn, Auto-updates disabled List Categories: version: 0.4, author: Fernando Briano, Auto-updates disabled MainWP Child: version: 4.4.0.1, author: MainWP, Auto-updates disabled Manage Notification E-mails: version: 1.8.4, author: Virgial Berveling, Auto-updates disabled Media Sync: version: 1.2.9, author: Erol Živina, Auto-updates disabled Meta Box: version: 5.6.17, author: MetaBox.io, Auto-updates disabled MonsterInsights - Dimensions Addon: version: 2.0.6, author: MonsterInsights Team, Auto-updates disabled MonsterInsights - Forms Tracking Addon: version: 2.2.6, author: MonsterInsights Team, Auto-updates disabled MonsterInsights - Media Addon: version: 1.0.7, author: MonsterInsights Team, Auto-updates disabled MonsterInsights - Page Insights Addon: version: 1.5.2, author: MonsterInsights Team, Auto-updates disabled MonsterInsights Pro: version: 8.13.1, author: MonsterInsights, Auto-updates disabled Ninja Forms: version: 3.6.20, author: Saturday Drive, Auto-updates disabled Page-list: version: 5.3, author: webvitaly, Auto-updates disabled Page scroll to id: version: 1.7.7, author: malihu, Auto-updates disabled Pages with category and tag: version: 0.9.0, author: YAHMAN, Auto-updates disabled Popup Maker: version: 1.18.1, author: Popup Maker, Auto-updates disabled Post Slider For Visual Composer: version: 1.1, author: Nasir, Auto-updates disabled PublishPress Permissions: version: 3.8.5, author: PublishPress, Auto-updates disabled Redirection: version: 5.3.9, author: John Godley, Auto-updates disabled rtMedia for WordPress, BuddyPress and bbPress: version: 4.6.13, author: rtCamp, Auto-updates disabled SearchWP: version: 4.2.9, author: SearchWP, Auto-updates disabled SearchWP bbPress Integration: version: 1.3.1, author: SearchWP, Auto-updates disabled SearchWP Custom Results Order: version: 1.3.6, author: SearchWP, Auto-updates disabled SearchWP Live Ajax Search: version: 1.7.4, author: SearchWP, LLC, Auto-updates disabled SearchWP Shortcodes: version: 1.8.3, author: SearchWP, Auto-updates disabled Shortcode in Menus: version: 3.5.1, author: Gagan Deep Singh, Auto-updates disabled Site Plugin for susyah.csfs.org: author: (undefined), version: (undefined), Auto-updates disabled Social Articles: version: 2.9.5, author: Broobe, Auto-updates disabled SQ Sidebar Generator: version: 1.2.2, author: SeventhQueen, Auto-updates disabled TablePress: version: 2.0.4, author: Tobias Bäthge, Auto-updates disabled The Events Calendar: version: 6.0.10, author: The Events Calendar, Auto-updates disabled The Events Calendar: Community Events: version: 4.10.5, author: The Events Calendar, Auto-updates disabled The Events Calendar: Filter Bar: version: 5.4.3, author: The Events Calendar, Auto-updates disabled The Events Calendar PRO: version: 6.0.9.2, author: The Events Calendar, Auto-updates disabled User Role Editor: version: 4.63.3, author: Vladimir Garagulya, Auto-updates disabled User Switching: version: 1.7.0, author: John Blackbourn & contributors, Auto-updates disabled UsersWP: version: 1.2.3.11, author: AyeCode Ltd, Auto-updates disabled Wbcom Designs - BuddyPress Member Export Import: version: 1.5.0, author: Wbcom Designs, Auto-updates disabled When Last Login: version: 1.2.2, author: Yoohoo Plugins, Auto-updates disabled WordPress Toolbar Editor: version: 1.4.2, author: Janis Elsts, Auto-updates disabled WP Add Mime Types: version: 3.0.3, author: Kimiya Kitani, Auto-updates disabled WPBakery Page Builder: version: 6.10.0, author: Michael M - WPBakery.com, Auto-updates disabled wpDataTables - Tables & Table Charts: version: 2.1.53, author: TMS-Plugins, Auto-updates disabled WP Easy Updates: version: 1.1.20, author: AyeCode Ltd, Auto-updates disabled WPForms Lite: version: 1.8.0.2, author: WPForms, Auto-updates disabled WP Rocket: version: 3.12.5.3, author: WP Media, Auto-updates disabled WP SMS: version: 6.1.1, author: VeronaLabs, Auto-updates disabled ### wp-plugins-inactive (1) ### Password Protected Categories: version: 2.1.8, author: Barn2 Plugins, Auto-updates disabled ### wp-media ### image_editor: WP_Image_Editor_GD imagick_module_version: Not available imagemagick_version: Not available imagick_version: Not available file_uploads: File uploads is turned off post_max_size: 128M upload_max_filesize: 128M max_effective_size: 128 MB max_file_uploads: 20 gd_version: 2.3.3 gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: 9.25 ### wp-server ### server_architecture: Linux 3.10.0-962.3.2.lve1.5.42.el7.x86_64 x86_64 httpd_software: Apache php_version: 7.4.33 64bit php_sapi: litespeed max_input_variables: 10000 time_limit: 360 memory_limit: 2048M max_input_time: 360 upload_max_filesize: 128M php_post_max_size: 128M curl_version: 7.84.0 OpenSSL/1.1.1p suhosin: false imagick_availability: false pretty_permalinks: true htaccess_extra_rules: true ### wp-database ### extension: mysqli server_version: 5.7.41 client_version: mysqlnd 7.4.33 max_allowed_packet: 268435456 max_connections: 250 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /home/susyah/public_html/wp-content WP_PLUGIN_DIR: /home/susyah/public_html/wp-content/plugins WP_MEMORY_LIMIT: 1024M WP_MAX_MEMORY_LIMIT: 2048M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: true SCRIPT_DEBUG: true WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: Undefined DB_CHARSET: utf8 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable 0: Writable ### jetpack ### site_id: 212215713 ssl_cert: No time_diff: 2 version_option: 11.9.1:1678828073 old_version: 11.9:1678301680 public: Public master_user: #1 ConceptDesign current_user: #1 ConceptDesign tokens_set: Blog User blog_token: P8&fk$QOWUjx^E0IRR3qiHSD*VPExwHg user_token: bvJ0#WWGEoaVgl@fq*KX$BqCk5YW7Si1 version: 11.9.1 jp_plugin_dir: /home/susyah/public_html/wp-content/plugins/jetpack/ plan: free protect_header: {"trusted_header":"REMOTE_ADDR","segments":1,"reverse":false} full_sync: {"started":"Tue, 08 Nov 2022 19:26:26 +0000","finished":"Tue, 08 Nov 2022 19:31:21 +0000","progress":{"comments":{"total":"5","sent":5,"finished":true,"last_sent":"3"},"constants":{"finished":true},"functions":{"finished":true},"options":{"finished":true},"posts":{"total":"3647","sent":3647,"finished":true,"last_sent":"2"},"term_relationships":{"total":"3115","sent":3115,"finished":true,"last_sent":{"object_id":"1","term_taxonomy_id":"270"}},"terms":{"total":"398","sent":398,"finished":true,"last_sent":"1"},"themes":{"finished":true},"updates":{"finished":true},"users":{"total":"83","sent":83,"finished":true,"last_sent":"1"}},"config":{"comments":1,"constants":1,"functions":1,"options":1,"posts":1,"term_relationships":1,"terms":1,"themes":1,"updates":1,"users":1}} sync_size: undefined sync_lag: 0 seconds full_sync_size: undefined full_sync_lag: 0 seconds idc_urls: {"home":"https:\/\/susyah.csfs.org","siteurl":"https:\/\/susyah.csfs.org","WP_HOME":"","WP_SITEURL":""} idc_error_option: false idc_optin: true cxn_tests: All Pass. ### buddypress ### version: 11.1.0 active_components: Community Members, Extended Profiles, Account Settings, Friend Connections, Private Messaging, Activity Streams, Notifications, User Groups template_pack: BuddyPress Nouveau 11.1.0 ! hide-loggedout-adminbar: No ! bp-disable-account-deletion: No ! bp-disable-avatar-uploads: Yes ! bp-disable-cover-image-uploads: Yes bp-enable-members-invitations: No bp-enable-membership-requests: No ! bp-disable-profile-sync: Yes ! bp_restrict_group_creation: No ! bp-disable-group-avatar-uploads: Yes ! bp-disable-group-cover-image-uploads: Yes ! bp-disable-blogforum-comments: Yes _bp_enable_heartbeat_refresh: Yes ### redux-framework ### version: 4.3.12 installation: in_plugin data directory: /home/susyah/public_html/wp-content/plugins/k-elements/lib/options/ browser: Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0 Browser: Firefox Version: 112.0 Platform: Apple ### redux-instance-kleo_kleo_child ### opt_name: kleo_kleo_child global_variable: false dev_mode: false ajax_save: false page_slug: kleo_options page_permissions: manage_options menu_type: menu page_parent: themes.php compiler: false output: false output_tag: true templates_path: undefined extensions: Customizer: 4.0.0 Import Export: 4.0.0 Metaboxes: 4.0.0 Options Object: 4.0.0 Repeater: 4.3.7 Search: 3.4.5 Shortcodes: 4.3.5 ### wpforms ### version: 1.8.0.2 lite: Nov 14, 2022 @ 5:41pm upload_dir: Writable total_forms: undefined total_submissions: undefined ### bp-profile-search ### version: 5.4.8 platform: BuddyPress 11.1.0 theme: Kleo Child index: /plugins/buddypress/bp-templates/bp-nouveau/buddypress/members/index.php loop: /plugins/buddypress/bp-templates/bp-nouveau/buddypress/members/members-loop.php template0: /themes/kleo/buddypress-nouveau/members/bps-form-legacy.php template1: /themes/kleo/buddypress-nouveau/members/bps-form-inline.php template2: /themes/kleo/buddypress-nouveau/members/bps-form-with-labels.php
Hi,
I have been using the below code, So when someone clicks on the profile of an association it will redirect to the products tab.
All is well and I can use the other tabs to navigate around except when I click on the activities tab. It takes me to the products tab users cannot see the associations (role) activity stream.I removed this code and it worked fine so it is some where here. I have this in the child-theme/buddypress-nouveau/members/single/home.php page
WP Version 5.7.2 PHP 7.4.12
$displayed_user = new WP_User( bp_displayed_user_id() ); if ( ( in_array( 'associations', $displayed_user->roles, true )) && (strpos($_SERVER['REQUEST_URI'], "my-products") == false) && (strpos($_SERVER['REQUEST_URI'], "front") == false) && (strpos($_SERVER['REQUEST_URI'], "profile") == false) && (strpos($_SERVER['REQUEST_URI'], "activity") == false) && (strpos($_SERVER['REQUEST_URI'], "friends") == false) && (strpos($_SERVER['REQUEST_URI'], "my-donations") == false) && (strpos($_SERVER['REQUEST_URI'], "notifications") == false) && (strpos($_SERVER['REQUEST_URI'], "messages") == false) && (strpos($_SERVER['REQUEST_URI'], "groups") == false) && (strpos($_SERVER['REQUEST_URI'], "location") == false) && (strpos($_SERVER['REQUEST_URI'], "invite-anyone") == false) && (strpos($_SERVER['REQUEST_URI'], "settings") == false) && (strpos($_SERVER['REQUEST_URI'], "w-my-account") == false) && (strpos($_SERVER['REQUEST_URI'], "store-manager") == false) && (strpos($_SERVER['REQUEST_URI'], "articles") == false) && (strpos($_SERVER['REQUEST_URI'], "media") == false) && (strpos($_SERVER['REQUEST_URI'], "item-header-content") == false) ) { //is assoc and is not already redirected to products or other profile links $currenturl = $_SERVER['REQUEST_URI']; $urlto = $currenturl."my-products"; ?> <script> window.location.replace("<?php echo($urlto); ?>"); </script> <?php } else { // just load ?>
Thank you for helping with this
Project Details :
– WordPress version : 5.5.3
– BuddyPress version : 6.3.0
– Website Link : https://microfarmap.dev-local.com/
– Other plugins I use : Advanced Custom Fields PRO, Advanced Custom Fields: JSON, bbPress, bbPress – Moderation Tools, BuddyForm Premium, BuddyForm Advanced Custom Fields, BuddyForm Hook Fields, BuddoForm Members Premium, BuddyPress Username Changer, Custom Post Type UI, LoginPress, Paid Memberships Pro, Progress Map, List & Filter, User Role Editor …Hello,
I have been updating a WordPress website that was made by others, I might lack some information.BuddyPress works like a charm except for a few features :
– From the user profile, we can send friendship requests. As a new user, I sent a friendship request to my admin account. I did receive the notification on my admin profile, but the Friends tab says there is no friend requests pending. It just doesn’t display theme on my customized Understrap theme.
– Switching to WordPress Twenty Twenty One theme does solve the issues. Switching to Understrap parent theme does switch the issue. There seems to be a problem with my custom theme.
Under this custom there, there is a /buddypress/ directory with template pages and loops. The buddypress/members/single/friends/requests-loop.php file was not modified, it’s the default one. That’s where I checked first.
I also checked in the plugin files directly, under plugins/buddypress/bp-friends/bp-friends-functions.php but did not find a clue.
After some research, I found out that only users that have an active ‘ Paid Memberships Pro ‘ subscription can send friend requests, or atleast their friend requests appear.
I also installed the ” BuddyPress Integration ” plugin from Paid Memberships Pro website, in which there is an option to allow non-registered users to send friend requests, but it did not solve the issue.
Please if you need more details or even an access, do not mind asking.
Hello,
I have buddyforms and Buddypress and the extended profile.
When I want to modify the profile on front-end :
– if I am admin ==> I can modify all fields
– If am the member ==> I have a blank page on modifySo, I would like to know how to display the fields when the member connect please ?
Is this link to user role ? To an another extension ?
Hi, i feel like im doing this properly but i never get the right result. i have a custom meta called “featured” in activity meta. For testing purposes the meta values are 1,2,3,4 my goal is to have an activity loop order activities by the meta value. i’ve checked the documentation and i came up with this.
<?php get_header(); ?> <?php get_template_part('page-parts/general-title-section'); ?> <?php get_template_part('page-parts/general-before-wrap'); $atts = array( 'title' => 'Latest Activity',// title of the section. 'pagination' => 1,// show or not. 'load_more' => 0, 'display_comments' => 'threaded', 'include' => false, // pass an activity_id or string of IDs comma-separated 'exclude' => false, // pass an activity_id or string of IDs comma-separated 'in' => false, // comma-separated list or array of activity IDs among which to search 'sort' => 'DESC', // sort DESC or ASC 'page' => 1, // which page to load 'per_page' => 5, // how many per page. 'max' => false, // max number to return. 'count_total' => true, // Scope - pre-built activity filters for a user (friends/groups/favorites/mentions). 'scope' => false, // Filtering 'user_id' => false, // user_id to filter on 'object' => false, // object to filter on e.g. groups, profile, status, friends 'action' => false, // action to filter on e.g. activity_update, new_forum_post, profile_updated 'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc. 'secondary_id' => false, // secondary object ID to filter on e.g. a post_id. // Searching 'search_terms' => false, // specify terms to search on. 'use_compat' => bp_use_theme_compat_with_current_theme(), 'allow_posting' => false, // experimental, some of the themes may not support it. 'container_class' => 'activity',// default container, 'hide_on_activity' => 1,// hide on user and group activity pages. 'for' => '', // 'logged','displayed','author'. 'role' => '', // use one or more role here(e.g administrator,editor etc). 'for_group' => '',// group slug. ); $atts['meta_query']= array( array( 'key' => 'featured', 'value' => '0', 'type' => 'numeric', 'compare' => '!=', ), 'meta_type' => 'numeric', 'orderby' => 'meta_value_num', 'meta_key' => 'featured', 'order' => 'DESC' ); ?> <div id="buddypress"> <?php do_action( 'bp_before_activity_loop' ); if ( bp_has_activities( $atts ) ) : ?> <div class="<?php echo esc_attr( $atts['container_class'] ); ?> <?php if ( ! $atts['display_comments'] ) : ?> hide-activity-comments<?php endif; ?>"> <ul id="activity-stream" class="activity-list item-list"> <?php while ( bp_activities() ) : bp_the_activity(); ?> <?php bp_get_template_part( 'buddypress/activity/entry' ); ?> <?php endwhile; ?> <?php if ( $atts['load_more'] && bp_activity_has_more_items() ) : ?> <li class="load-more"> <a href="<?php bp_activity_load_more_link() ?>"><?php _e( 'Load More', 'buddypress' ); ?></a> </li> <?php endif; ?> </ul> <?php if ( $atts['pagination'] && ! $atts['load_more'] ) : ?> <div class="pagination"> <div class="pag-count"><?php bp_activity_pagination_count(); ?></div> <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div> </div> <?php endif; ?> </div> <?php else : ?> <div id="message" class="info"> <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?></p> </div> <?php endif; ?> ?> </div> <?php do_action( 'bp_after_activity_loop' ); ?> <?php get_template_part('page-parts/general-after-wrap'); ?> <?php get_footer(); ?>
everything here works except for the order. for some reason it always orders by activity ID. am i missing something here? Thanks in advance im going crazy with this.
Hi guys 🙂
My users have many custom fields in their profile.
I’m trying to create a member page, with different loops, because I need to split them in different groups with different criteria.I’m using the my_custom_ids function, but I’m getting crazy…
<?php if ( bp_has_members( my_custom_ids( 'Nome', 'testB' ) ) ) : ?>
is working. The loop displays only one user, named “testB”<?php if ( bp_has_members( my_custom_ids( 'Nickname', 'web9' ) ) ) : ?>
is working. The loop displays only one user, with the nickname “web9”<?php if ( bp_has_members( my_custom_ids( ‘Role’, ‘iscritto’ ) ) ) : ?>
is NOT working. Also Administrators are displayed.
This is not the only problem. It happens also with other fields, but I can’t understand why…Topic: Rol in cover page of profile
Hi!
I saw this code for add the role in the profile of the User.
I want show it in the cover page of his profile, can you help me?
Thanks very much!add_action( 'bp_before_member_header_meta', 'devb_show_role_on_profile' ); function devb_show_role_on_profile() { global $wp_roles; $user_id = bp_displayed_user_id(); $user = get_userdata($user_id); $roles = $user->roles; if ( !$roles ) return; if ( !isset( $wp_roles ) ) $wp_roles = new WP_Roles(); $named_roles = array(); foreach ( $roles as $role ) { $named_roles [] = $wp_roles->role_names[$role]; } if ( $named_roles ) echo '<span class="user-role activity">' . join(', ', $named_roles) . '</span>'; }
hi, i am searching everywhere but i cannot find a way to hide a subnav element (‘Bookings’,’Calendar’) on a profile page when the displayed user does NOT have a certain role (Author).
Hi!
I’m having some hard time with the following:
I want to place my profile avatar (item-header-avatar) from the header to the left from my item-nav and eventually delete the header section.
I’m editing the member-header.php file through my child-theme ( using Kleo-theme ). I thought it would be as easy as copying the div from item-header-avatar and pasting it after <ul class=”responsive-tabs”> but after loading the webpage it does not work.
So my code looks like this:
<?php/**
* Fires after the display of a member's header.
*
* @since 1.2.0
*/
do_action( 'bp_after_member_header' ); ?><?php if ( sq_option( 'bp_nav_overlay', 0 ) == 1 ) : ?>
<div id="item-nav">
<div class="item-list-tabs no-ajax" id="object-nav" aria-label="<?php esc_attr_e( 'Member primary navigation', 'buddypress' ); ?>" role="navigation">
<ul class="responsive-tabs">
<div id="item-header-avatar" class="rounded">
"><?php bp_displayed_user_avatar( 'type=full' ); ?>
<?php do_action('bp_member_online_status', bp_displayed_user_id()); ?>
</div><!-- #item-header-avatar --><?php bp_get_displayed_user_nav(); ?>
<?php
/**
* Fires after the display of member options navigation.
*
* @since 1.2.4
*/
do_action( 'bp_member_options_nav' ); ?></div>
</div>
<!-- #item-nav -->
<?php endif; ?>
Thankyou!!
I am using Buddypress and the BuddyBoss theme. I have 2 user types contributors and subscribers I made using BP Member Types and user profile fields. Everything is working except.
When a contributor is logged in and goes to a tab say members/username/messages the subnav tabs show perfectly little grey boxes next to each other.
But…
when a subscriber goes to a tab say members/username/messages the css for the subnav tabs does not show as if it’s not pulling the css. I check and the file that controls this css section is buddyboss/css/buddypress-main.min.css and I checked this file is being used in the source code of this page. So for some reason the subscriber account is not pulling this style sheet even though it’s shown as included in the source. I tried to hard code the entire css into my page and it still didn’t show.
the other thing I noticed was the code for the nav section was setup like this for contributor
<div id=”buddypress”>
<div id=”item-header” role=”complementary”>
<div id=”item-nav”>
<div id=”item-body”>but the subscriber one only shows like this
<div id=”buddypress”>
<div id=”item-nav”>
<div id=”item-body”>why would the section <div id=”item-header” role=”complementary”> not be showing for subscribers? Could this be my problem
Anyone have any ideas?
2)I wanted to ask if there was a function code that could print a word such as Website associate to display beside, users profile photo in the profile page when given a certain role.
3) Finally wanted to ask if it was possible to have a function where a green light dot is placed at side of a user profile page when the user is logged in, an example is
https://postimg.org/image/ym0tuaoy3/
as presently its grey there because the user is offline.Thanks you
Topic: Role on Profile Page
On some forums and social networks, you will see a badge or for example Admin next to the username of the member of the network that is an admin, or MOD next to their name if they are a moderator.
Do you know how we can display roles in WordPress next to usernames, use a badge or image, or know of a plugin that can accomplish custom roles or tags for staff members within buddy press?
(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!