Replies
- Ravi on June 22, 2020 at 5:42 am in reply to: Adding Xprofile fields to Recent Visitors directory? #31153
Hello Carsten,
No, It is only for Recent Visitors tab only if you want to use it globally for all tabs just remove the following code.
if ( ! function_exists( 'visitors_is_visitor_scope' ) || ! visitors_is_visitor_scope() ) { return; }
Regards
Ravi Hello Ramon,
Thank you for posting. Please let me know do you want to hide some member-types from member type dropdown generated by the Profile search form.
Regards
Ravi- Ravi on June 22, 2020 at 5:20 am in reply to: Adding Xprofile fields to Recent Visitors directory? #31150
Hello Carsten,
Thank you for acknowledgement. Use the following code to print extra content in Recent Visitors tab
/** * Adding extra content to member's directory */ function buddydev_recent_visitors_extra_content() { if ( ! function_exists( 'visitors_is_visitor_scope' ) || ! visitors_is_visitor_scope() ) { return; } echo "put you content here"; } add_action( 'bp_directory_members_item', 'buddydev_recent_visitors_extra_content' );
Regards
Ravi - Ravi on June 22, 2020 at 4:42 am in reply to: Adding Xprofile fields to Recent Visitors directory? #31148
Hello Carsten,
Thank you for posting. Are you looking for a way to populate extra data in Member’s directory > Recent Visitor specific tab only?. Plese let me know.
Regards
Ravi - Ravi on June 19, 2020 at 9:50 pm in reply to: [Resolved] Conflict between BuddyPress Avatar Moderator and BuddyPress Profile Completion #31105
Hello Granmeh,
I have tested and found a bug in “BuddyPress Avatar Moderator” which was restricting an action.”BuddyPress Profile Completion” plugin use that action to set the meta that is why meta always 1. I have updated both the plugins please download the latest version of “BuddyPress Avatar Moderator” and for “BuddyPress Profile Completion” download from the following URL:
https://github.com/buddydev/bp-profile-completion
Please check it and let me know if the issue persists or not.
Regards
Ravi - Ravi on June 16, 2020 at 11:31 am in reply to: [Resolved] Profile Visibility Plugin not showing new members #30911This reply has been marked as private.
- Ravi on June 16, 2020 at 6:04 am in reply to: [Resolved] Profile Visibility Plugin not showing new members #30888
Hello Bernard,
Sorry for the inconvenience. Please share your settings so that I can test it quickly.
Regards
Ravi Hello Ankit,
Above code provided just a sample code How to add a nav item using code. Please try the following code in your active theme “functions.php” file. It will add a menu with name “Visitors” and count. Please make sure you have enabled “Show a profile tab?” setting.
/** * Add visitors link * * @param string $items The HTML list content for the menu items. * @param stdClass $args An object containing wp_nav_menu() arguments. * * @return string */ function add_visitors_link( $items, $args ) { if ( ! is_user_logged_in() || ! function_exists( 'buddypress' ) || ! function_exists( 'visitors_get_profile_visit_count' ) ) { return $items; } $visitors_count = visitors_get_profile_visit_count( bp_loggedin_user_id() ); $visitors_tab_url = trailingslashit( bp_loggedin_user_domain() . 'visitors' ); $items .= sprintf( '<li><a href="%s">%s <span>%s</span></a></li>', esc_url( $visitors_tab_url ), __( 'Visitors', 'buddypress' ), $visitors_count ); return $items; } add_filter( 'wp_nav_menu_items', 'add_visitors_link', 10, 2 );
Regards
RaviHello Ankit,
Try using with code. Check the following code adding a login/logout menu.
function add_login_logout_link($items, $args) { $loginoutlink = wp_loginout('index.php', false); $items .= '<li>'. $loginoutlink .'</li>'; return $items; } add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
Regards
RaviHello Ankit,
As per replied earlier in #30802. We do not provide any way to have counter there. Sorry, But I can not help you much here
Regards
Ravi