Replies
- Tosin on January 28, 2021 at 10:01 am in reply to: [Resolved] Display followers tab in members directory #35864
It did not work
function bpfollow_add_followers_tab() { if ( ! is_user_logged_in() ) { return; } $count = bp_follow_get_the_followers_count(); if ( empty( $count ) ) { return; } ?> <li id="members-followers"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWERS_SLUG ?>"><?php printf( __( 'My Followers <span>%d</span>', 'buddypress-followers' ), esc_html( $count ) ) ?></a></li> <?php } add_action( 'bp_members_directory_member_types', 'bpfollow_add_followers_tab', 999 );
- Tosin on January 28, 2021 at 9:39 am in reply to: [Resolved] Display followers tab in members directory #35860
But now how can I change the menu position for this code, My total menu items is 7, I want the (My Followers) tab to be positioned last
- This reply was modified 4 years, 3 months ago by
Tosin.
- This reply was modified 4 years, 3 months ago by
- Tosin on January 28, 2021 at 9:20 am in reply to: [Resolved] Display followers tab in members directory #35859
Yeah I finally got it, thanks for making me brainstrom
/** * Add a "Followers (X)" tab to the members directory. * * This is so the logged-in user can filter the members directory to only * users that the current user is following. * * @uses bp_follow_total_follow_counts() Get the following/followers counts for a user. */ function bpfollow_add_followers_tab() { if ( ! is_user_logged_in() ) { return; } $count = bp_follow_get_the_followers_count(); if ( empty( $count ) ) { return; } ?> <li id="members-followers"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWERS_SLUG ?>"><?php printf( __( 'My Followers <span>%d</span>', 'buddypress-followers' ), esc_html( $count ) ) ?></a></li> <?php } add_action( 'bp_members_directory_member_types', 'bpfollow_add_followers_tab' );
- Tosin on January 28, 2021 at 9:04 am in reply to: [Resolved] Display followers tab in members directory #35857
I added the code below to my bp-custom.php file but my site crashed
/** * Add a "Following (X)" tab to the members directory. * * This is so the logged-in user can filter the members directory to only * users that the current user is following. * * @uses bp_follow_total_follow_counts() Get the following/followers counts for a user. */ function bp_follow_add_following_tab() { if ( ! is_user_logged_in() ) { return; } $count = bp_follow_get_the_following_count(); if ( empty( $count ) ) { return; } ?> <li id="members-following"><a href="<?php echo bp_loggedin_user_domain() . BP_FOLLOWING_SLUG ?>"><?php printf( __( 'Following <span>%d</span>', 'buddypress-followers' ), esc_html( $count ) ) ?></a></li> <?php } add_action( 'bp_members_directory_member_types', 'bp_follow_add_following_tab' );
Hello,
1. Will the pay per post feature also work with the standalone version with shortcodes or will it be an addon?
Any feed back on this
BUDDYBLOG PRO AND BUDDYPRESS ACTIVITY PRIVACY PLUGIN PRIVACY SYNCHRONIZATION
Hello,
I was thinking if its possible to make buddyblog pro have the same privacy options as the BUDDYPRESS ACTIVITY PRIVACY PLUGIN with support for follow plugin.
Users can select if they want only their friends or followers to read their blog post.
For Example
– User A sets his recent blog post privacy option to (my followers)
– User B, C and D who do not follow User A try to read User A’s blog post but they are redirected to a custom restriction page.
– The custom restriction pages contains a message telling the user that he needs to follow the blog post author in order read his post.I think a custom page redirection is better to prevent google picking up lots of 404 errors on restricted posts.
Also when the buddyblog privacy is set to (my followers) The corresponding activity of the post using the ACTIVITY PRIVACY PLUGIN should automatically change to (my followers). Both plugin privacy options should be synchronized.
What are your thoughts on this?
This is the code in the plugin can this code be added to bp-custom.php file
if (!defined('ABSPATH')) { exit; } function tomas_bp_no_404() { global $wp_query; if (!(empty(bp_current_component()))) { $wp_query->is_404 = false; } } add_action( 'template_redirect', 'tomas_bp_no_404' ,1);
Hello Ravi
I was digging through wordpress directory and I found this plugin which fixed the issue https://wordpress.org/plugins/bp-404s/ The plugin author gave some explanations in plugin description
My question now is why does buddypress generate 404 errors in the first place when ROOT PROFILE is enabled in bp-custom.php.
Thanks
- This reply has been marked as private.