Search Results for 'custom activity page'
-
AuthorSearch Results
-
November 8, 2015 at 3:47 am #246481
jtorral
ParticipantSo I partially fixed it but I think I need buddypress input for the following.
Here is what I did
I created a custom template from a copy of the page.php in the themes directory. Inside of that template was a call to comments_template(); which I removed from the custom template.
I then changed the “Members” page to use the new template with a name of “No Comments”
Now when I load http://jorgetorralba.com/members/ I get the desired affect without the comments and ping backs.
However, if I go one level deeper and click on a user name such as
http://jorgetorralba.com/members/cjtorralba/
The comments reappear. Same on Activity page even after changing activity to use the new custom templates.
Any idea ???
October 28, 2015 at 2:48 pm #246094In reply to: Hide All Admins from All Buddypress Activities
splufford
ParticipantHi, struggling to get any of the the code in post #190874 to work. I have created a bp-custom.php file which I have uploaded to the root of the buddpress folder and my code looks like this:
<?php // deny access to admins profile. User is redirected to the homepage function bpfr_hide_admins_profile() { global $bp; if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) : wp_redirect( home_url() ); exit; endif; } add_action( 'wp', 'bpfr_hide_admins_profile', 1 ); // Remove admin from the member directory function bpdev_exclude_users($qs=false,$object=false){ $excluded_user='1'; // Id's to remove, separated by comma if($object != 'members' && $object != 'friends')// hide admin to members & friends return $qs; $args=wp_parse_args($qs); if(!empty($args['user_id'])) return $qs; if(!empty($args['exclude'])) $args['exclude'] = $args['exclude'].','.$excluded_user; else $args['exclude'] = $excluded_user; $qs = build_query($args); return $qs; } add_action('bp_ajax_querystring','bpdev_exclude_users',20,2); // once admin is removed, we must recount the members ! function bpfr_hide_get_total_filter($count){ return $count-1; } add_filter('bp_get_total_member_count','bpfr_hide_get_total_filter'); // hide admin's activities from all activity feeds function bpfr_hide_admin_activity( $a, $activities ) { // ... but allow admin to see his activities! if ( is_site_admin() ) return $activities; foreach ( $activities->activities as $key => $activity ) { // ID's to exclude, separated by commas. ID 1 is always the superadmin if ( $activity->user_id == 1 ) { unset( $activities->activities[$key] ); $activities->activity_count = $activities->activity_count-1; $activities->total_activity_count = $activities->total_activity_count-1; $activities->pag_num = $activities->pag_num -1; } } // Renumber the array keys to account for missing items $activities_new = array_values( $activities->activities ); $activities->activities = $activities_new; return $activities; } add_action( 'bp_has_activities', 'bpfr_hide_admin_activity', 10, 2 ); ?>Not sure what I am doing wrong. All help gratefully received! Thanks
October 28, 2015 at 12:14 pm #246091In reply to: Buddypress in multisite
mc9625
ParticipantHi, actually I’ve already added
add_post_type_support( 'recipe', 'buddypress-activity' );to bp-custom.php in /wp-content/plugins. The recipes are counted in the “member activity stream”, but only the ones posted directly in the parent site, not the ones posted in the member’s blog.
I think it’s a pity you can’t use a “blog” as the user profile page, or at least give the user profile page, the same kind of customisation as a full blog install. I think this is more a “Facebook” kind of approach, everyone will have more or less the same kind of page, with minimal customisation option (I guess the header profile). But since WordPress already has a multisite option, and Buddypress already support multisite environment, have the chance to use the user’s blog as if it were his “user profile” would have been a huge facility.
October 19, 2015 at 8:13 pm #245729pnet
ParticipantWell as soon as I post it I figure it out.. go figure 🙂
In case anyone else is confused here’s what I did and I had no clue going into it.
Use this https://codex.buddypress.org/getting-started/customizing/customizing-labels-messages-and-urls/ for a reference on what to name your files and where to put them. (.po and .mo files, trust me I did not even know what these were)
Download this editor/compiler here: https://poedit.net/download (it’s free!)
You will need this to create (compile) the .mo file (if you want to know what these files are google it, that’s what I did)Use the buddypress link above and go to the “Translating with PoEdit” section, it will walk you through how to open the file with Poedit.
(This part “This will open a settings dialog and you will be asked to fill in some details such as project name which we’ll skip. Click on ‘OK’ and you’ll be asked to save your language file.” did not happen for me, it asked me my language and I selected English United States, choose what you desire.)Now remember in my case I needed to change a few buddypress page titles.
Example: I wanted to change the buddypress title “Groups” to “Chat Rooms” –
While in Poedit with your .po file open, where you need to change it seems to be near the bottom of the file. Scroll down until you see something like this “Site-Wide Activity [component directory title]” (this was the first one for me). These are the buddypress page titles, this is where you can change them.Click on the title you want to change, my case Groups, below you will see “Source text” this is where “Groups” is showing. In the text area under that you will see “Translation”, this is where I typed “Chat Rooms”, as this is the title I would like it changed to.
When finished Save your .po file. Back to Poedit, click File, select “Compile to MO” , save you .mo file as directed in the buddypress link above.
Follow the rest of the instructions in the link to upload your .po and .mo files.I hope this helps out others who are new to buddypress! 🙂
September 28, 2015 at 5:39 am #244861In reply to: Rename Home URL+Slug in BP Group
sharmavishal
Participant@danbp thanks for your reply. its highly appreciated. I understand its bit unnecessary.
Am using a custom home page via BuddyPress Groups Extras. So on my site the home page for groups is gpages which doesnt have a slug in the URL which is great.
now my second tab is “Home” which i renamed to “Activity”. This is also fine. But the slug of Activity page is “home”. so when i click on the activity tab the URL in the broswer shows group/name/home.
I believe the previous versions of BP the home page was actually named as Activity right?
the only way i can fix this is via hacking the core BP file bp-groups-loader.php
// Add the "Home" subnav item, as this will always be present $sub_nav[] = array( 'name' => _x( 'Activity', 'Group screen navigation title', 'buddypress' ), 'slug' => 'activity',Thanks once again
September 16, 2015 at 8:46 am #244443In reply to: “$bp->current_component” returns empty string
anbusurendhar
ParticipantIn buddypress, activity, members, group have a definite pages like ‘domain/activity’, ‘domain/members’, ‘domain/group’, respectively. Likewise I’m trying to create my own custom page like ‘domain/mycustom’.
For this purpose I referred John James Jacoby’s Post in here. The snippet used in that link didn’t work for me. I don’t know where I’m missing.
From that snippet, I found that
$bp->current_componentreturns me an empty string.September 16, 2015 at 4:59 am #244438In reply to: “$bp->current_component” returns empty string
anbusurendhar
Participant@danbp : Thank You very much for your reply.
Even I’ve tried
bp_current_component()andbp_is_current_component()functions with no success.Actually this function works fine when used in default buddypress pages like
domain/activity/. This returns me “activity”, which is exactly correct. But when I tried this in my custom page (domain/custompage), I’m getting an empty string.September 15, 2015 at 1:10 pm #244398In reply to: Activity stream customisation options…
Venutius
ModeratorYes I would like better customisation options for activity stream to be able to identify exactly which items appear in the activity stream.
Some new options could be to include updates to blogs and pages to be included in the activity stream. Similarly I would like to have the ability to choose not to show items such as members joining groups in the stream.
Just would be nice to have some options over what is and is not included.
September 3, 2015 at 7:08 pm #244033djsteveb
Participant@shubham9
I have not used this, but I was looking at it yesterday and now thinking about it ->I imagine you could read up on the latest discussions about parse_Args and such and code this yourself.. I have a good imagination though..
I myself have been considering asking for a way to display both the “profile tab” and the “activity” tab info below that.. with a selectable filter for “Just John Doe” or “John Doe and friends” or something like that.. think that would be cool – and likely not too hard to mashup…
but I’m still learning php, maybe someone else has an idea on how to make that happen with a simple them functions.php mixin .. I already have a think in bp-custom to make the default profile page show the profile tab instead of the defaults.. so the code is here and there around here I guess.
August 31, 2015 at 12:24 am #243881In reply to: filter activity loop
Angelo Rocha
ParticipantHi Henry Wright.
I pasted in functions.php
=/
This is my custom loop:<?php do_action( 'bp_before_activity_loop' ); ?> <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?> <noscript> <div class="pagination"> <div class="pag-count"><?php bp_activity_pagination_count(); ?></div> <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div> </div> </noscript> <?php if ( empty( $_POST['page'] ) ) : ?> <ul id="activity-stream" class="activity-list item-list"> <?php endif; ?> <?php while ( bp_activities() ) : bp_the_activity(); ?> <?php locate_template( array( 'activity/entry.php' ), true, false ); ?> <?php endwhile; ?> <?php if ( bp_activity_has_more_items() ) : ?> <li class="load-more"> <a href="#more"><?php _e( 'Load More', 'buddypress' ); ?></a> </li> <?php endif; ?> <?php if ( empty( $_POST['page'] ) ) : ?> </ul> <?php endif; ?> <?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; ?> <?php do_action( 'bp_after_activity_loop' ); ?> <form action="" name="activity-loop-form" id="activity-loop-form" method="post"> <?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ); ?> </form>August 28, 2015 at 5:23 am #243748djsteveb
Participant@jrunfitpro “there wasn’t a good answer for my question” –
I think you should of imply replied to your previous (not dupe) thread – would keep things more tidy.
Also you never reported back what your optimize press people had any details about the issue.anyhow, with your setup I wonder..
“not pulling from certain pages ”
– what exactly is not being pulled?
from pages?
posts?
multi-site sub blogs?
Pulled from media comments?If you switch to default 2014 theme – does it work then?
If you use 2014 theme and disable all other plugins (and mu-plugins and bp-custom if you have those) aside from BP is the issue resolved?
If “not pulling from certain pages” still does not work with 2014 and all other plugins removed, then you may find the answer on the other threads and solution hunting things posted:
(and those items linked in comments from there)If “not pulling from certain pages” does work fine with 2014 as theme and other plugins disabled – then it’s an issue with your other theme or plugins (or combo of them).
August 28, 2015 at 12:22 am #243741In reply to: Quick question about this
djsteveb
ParticipantActivity wall – Yes – in core.
all members chat – private user to user email like messages in core. Chat rooms with plugins like “quick chat” – so yes
sleek custom profiles for members, -hard to tell what is “sleek” – custom? for each member? There are a couple of plugins that played with this – not sure how they work, if they’ve been updated lately.. modding how all profiles look to make them “sleeker” than default 2015 – theme – possible..a paid membership option – that would be a plugin.. there are several that get into that.. s2member, paid memberships pro, ultimate member maybe? Some options from wpmudev as well I think.
A way to let paid members make their own post/articles on the homepage – hmmm.. maybe prevent non paid members from even creating a blog.. or you mean any activity posts on home page – I think these things are possible.. BP recently added “user levels” but I have not see much actually use that.. but extending this should be easy to some degree..
However if your focus is on paid members things, and you will need support to put all this together and keep it running (you are not a php coder with lots of time to read codex and test things) – then developing around BP is likely to get expensive, and you might be better off forgetting bp exists and looking at some of the more premium systems others have put together around wordpress (a few wpmudev plugins combined achieve what you describe without needing BP) – and there are others..
Of course you don’t have to look for such a system revolving around wordpress either – there are more mature social network options that may save you time and sanity – things like phpfox, boonex dolphin, oxwall..
random thoughts from a bp user.. I’m not a dev and have not tested all the things out there that get into paid members things and restrictions.. if you search the forums here there have been a few comments from others pointing to some other similar plugin options – and some people have pointed out troubles with some of those on the market.
August 26, 2015 at 10:30 pm #243681zoewsaldana
ParticipantFixed it!! Okay, for anyone who encounters this issue, the problem was that for some reason (I think perhaps how WP or my server is caching pages) the hooks I was choosing to target for the behavior weren’t working. So instead I added both functions to the “wp” hook, and now it works site-wide!
/* You can add custom functions below, in the empty area =========================================================== */ function bp_guest_redirect( $name ) { if( ! is_user_logged_in() ) { if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_directory() || bp_is_user() || bp_is_members_component() ) wp_redirect( get_option('siteurl') . '/new_member/' ); } } add_action( 'wp', 'bp_guest_redirect', 1, 1 ); function bpfr_hide_rss_feed_to_nonreg_visitor() { if ( !is_user_logged_in() ) { remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' ); remove_action( 'bp_actions', 'bp_activity_action_personal_feed' ); remove_action( 'bp_actions', 'bp_activity_action_friends_feed' ); remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed' ); remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' ); remove_action( 'bp_actions', 'bp_activity_action_favorites_feed' ); remove_action( 'groups_action_group_feed', 'groups_action_group_feed' ); } } add_action('wp', 'bpfr_hide_rss_feed_to_nonreg_visitor');My theme framework (WPZoom) also recommended I place theme modifying code in the functions/user/ pathway, so I modified functions.php there instead of using bp-custom. I think it would work either place, however.
Thank you!
August 26, 2015 at 1:15 am #243627danbp
ParticipantAny ideas what I’m doing wrong? Using over 4 years old tricks ? 😉
Give this a try (in bp-custom)
function bpfr_guest_redirect() { global $bp; // enter the slug or component conditional here if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) || is_bbpress() ) { // not logged in user - user will be redirect to any link you want if( !is_user_logged_in() ) { //wp_redirect( get_option('siteurl') ); //back to homepage //wp_redirect( get_option('siteurl') . '/register' ); // back to register page wp_redirect( get_option('siteurl') . '/your_page_title' ); // back to whatever page } } } add_filter('get_header','bpfr_guest_redirect',1);And to close the second entry door, which many users seems to ignore…
function bpfr_hide_rss_feed_to_nonreg_visitor() { if ( !is_user_logged_in() ) { remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' ); remove_action( 'bp_actions', 'bp_activity_action_personal_feed' ); remove_action( 'bp_actions', 'bp_activity_action_friends_feed' ); remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed' ); remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' ); remove_action( 'bp_actions', 'bp_activity_action_favorites_feed' ); remove_action( 'groups_action_group_feed', 'groups_action_group_feed' ); } } add_action('init', 'bpfr_hide_rss_feed_to_nonreg_visitor');August 24, 2015 at 4:14 am #243519In reply to: bp_core_remove_nav_item
danbp
ParticipantHi @muskokee,
BP nav menu code is in bp-core-template.php:3050 to EOF.To change the position of an item on profiles page, use this from within bp-custom.php
Position is defined by the numeric value:function bpfr_profile_menu_tab_pos(){ global $bp; $bp->bp_nav['activity']['position'] = 30; $bp->bp_nav['forums']['position'] = 50; $bp->bp_nav['profile']['position'] = 25; $bp->bp_nav['messages']['position'] = 10; $bp->bp_nav['notifications']['position'] = 40; $bp->bp_nav['friends']['position'] = 20; $bp->bp_nav['groups']['position'] = 60; } add_action('bp_setup_nav', 'bpfr_profile_menu_tab_pos', 100);You can also add some condition on the template. Ie
if ( is_user_logged_in() ) : your custom menu stuff else something for non logged user endif;Other reference: https://codex.buddypress.org/themes/members-navigation-menus/
July 19, 2015 at 9:56 am #241989In reply to: Duplicate activity/members/groups seperate language
Roger Coathup
ParticipantThe default BuddyPress site setup only supports a single activity, members, groups directory page.
One solution is to create your own custom page templates, and embed the code for the activity, member and group loops in the template. You’d then assign it to your duplicate pages. You can read more about coding your own loops in the documentation section of this site.
You could also look to see if it’s possible to use the language files — dynamically loading the appropriate text domain translations of the BuddyPress text depending which language the user has selected. In this scenario, you’d work with the default ‘single’ page setup.
Perhaps too late for your site (if you’ve gone down the polylang route), but for all our multi language solutions, we go the multisite approach and using the Multilingual Press Pro plugin. It gives a really clean solution. Remember to enable bp multiblog if you switch to this approach.
July 15, 2015 at 3:54 pm #241869In reply to: theoretically, is it possible to do this?
peter-hamilton
Participantsorry, password is: demouser
I hope it shows a bit more then just a bbpress forum thats added,
Took me a long time to add the custom functions, especially the profile pages and activity.July 7, 2015 at 9:12 am #241522Prabin
Participanthi @danbp
Actually, I want to display the “Most Favorited Count” in single activity group page in custom drop-down select option called “Most Agreed”. See Above Images.['type'] == 'featured'
I wanted to compare option value inside the meta_query
<option value="featured"><?php _e( 'Most Agreed' ); ?></option>I am not sure if it works. can you debug this for me ? or what code i need to add ?
July 7, 2015 at 7:51 am #241516Prabin
Participant@danbp, I have an issue..
I have “Most Agreed” option in single group page. but the query is not returning desired value.
can you look into this?Here’s the Screenshot

and Here’s the code
if( class_exists( 'BP_Group_Extension' ) ) : class bpgmq_feature_group { public function __construct() { $this->setup_hooks(); } private function setup_hooks() { $bp = buddypress(); add_filter( 'bp_ajax_querystring', 'custom_filter_ajax_querystring' , 999, 2 ); // you need to do it for the group directory add_action( 'bp_group_activity_filter_options', array( $this, 'agreed_option' ) ); } public function agreed_option() { ?> <option value="featured"><?php _e( 'Most Agreed' ); ?></option> <?php } } function custom_filter_ajax_querystring( $querystring, $object ) { #var_dump($querystring); if($object != 'activity' ) return $querystring; $defaults = array('type'=>'active','action'=> 'active','scope'=> 'all','page'=>1,'order'=>'DESC'); #exit; /*if( $bpgmq_querystring['type'] != 'featured' ) return $querystring;*/ $bpgmq_querystring = wp_parse_args( $querystring, $defaults ); if( $bpgmq_querystring['type'] == 'featured' ){ $bpgmq_querystring['meta_query'] = array(array('key'=> 'favorite_count','value'=> 1,'type'=> 'numeric','compare' => '>=')); return apply_filters( 'bpgmq_filter_ajax_querystring', $bpgmq_querystring, $querystring ); } var_dump($querystring); } function bpgmq_agreed_group() { if( bp_is_active( 'activity') ) return new bpgmq_feature_group(); } add_action( 'bp_init', 'bpgmq_agreed_group' ); endif;Thanx in Advance
July 6, 2015 at 8:33 pm #241509In reply to: show entire activity stream – global activity stream
Quinn Goldwin
ParticipantHey Danbp,
Thank you for the quick responses and all your help. I tried playing around with your way but I’m not advanced enough for working with hooks and custom coding just yet.
I did find an easier work around that I just pasted into my bp-custom.php and it did the trick. But for other members trying to do this, you need to have the plugin http://buddydev.com/buddypress/show-buddypress-communitysitewide-activity-on-user-profile/ for this to work.
function bp_change_activity_subnav_default() { if ( bp_is_user_activity() ) { $args = array( 'parent_slug' => 'activity', 'subnav_slug' => 'all-activity' ); bp_core_new_nav_default($args); } } add_action('bp_setup_nav', 'bp_change_activity_subnav_default', 5);I understand you guys aren’t getting paid for your services but now i’m just struggling on adding a “whats new” post form to the all activity page. Buddy dev had some directions on how to add it but I think its dated cause I couldn’t find the code that we needed to switch out. Is there a simple way to add a whats new post form to the all activity page? It would be awesome if it was simple enough to paste it into bp-custom.php.
Thanks again for everything you guys are great!
June 30, 2015 at 9:43 pm #241307danbp
ParticipantWhich result when you use Twenty Fifteen theme ?
Do you use some custom functions on group page ?Also, as of Codex https://codex.buddypress.org/administrator-guide/groups/
This is a private groupOptions
Group content and activity will only be visible to members of the group.
June 28, 2015 at 5:14 pm #241218In reply to: show entire activity stream – global activity stream
danbp
Participantit goes to my personal activity instead.
It’s intended so ! You’re on a profile page, and any links added directly to buddybar or his subnav is alwways, and only, user related. It’s a contextual menu.
But you can use
bp_member_options_navaction hook which is on the template.
bp-templates/bp-legacy/buddypress/members/single/home.phpAdd this snippet to bp-custom.php your your child theme functions.php:
function goldwin_custom_setup_nav() { if ( bp_is_active( 'xprofile' ) ) ?> <li><a href="<?php bp_activity_directory_permalink(); ?>"><?php printf ('All Activities'); ?></a></li> <?php } add_action( 'bp_member_options_nav', 'goldwin_custom_setup_nav' );By default, the hook is placed as latest item of the navbar items. To get as first item, simply move the action at the begin of the list.
Default code looks like this:
<ul> <?php bp_get_displayed_user_nav(); ?> <?php do_action( 'bp_member_options_nav' ); ?> </ul>that you can chage to:
<ul> <?php do_action( 'bp_member_options_nav' ); ?> <?php bp_get_displayed_user_nav(); ?> </ul>But you can’t get your custom item as second, or third, or whatever. Only first or latest.
How to use bp-custom, functions.php and child_theme is explained on the codex.
June 19, 2015 at 7:26 am #240869In reply to: Display user Specific profile ?
danbp
ParticipantJune 9, 2015 at 9:32 pm #240512In reply to: Sponsored Ads
danbp
Participantyou can also read the doc and try to modify the activity template to your need.
https://codex.buddypress.org/template-updates-2-1/#activity-filter
and search for similar topics:
https://buddypress.org/support/search/custom+activity+page/June 5, 2015 at 2:02 pm #240278Dono12
ParticipantYes it is related to “Messages > Starred”. There is nothing wrong with the new feature. It’s this function that I found online that’s causing a conflict.
/* ——————————Start BP Post in profile code for function——————– */
function importSomething(){
return include_once ‘bp-custom.php’;
}
add_action( ‘bp_setup_nav’, ‘buddyboss_child_bp_nav_adder’ );
add_action( ‘bp_template_content’, ‘profile_buddyboss_child_loop’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );function buddyboss_child_bp_nav_adder() {
global $bp;
$post_count = count_user_posts_by_type( $bp->displayed_user->id );
bp_core_new_nav_item(
array(
‘name’ => sprintf( __( ‘Posts <span>%d</span>’, ‘my-poems’ ), $post_count ),
‘slug’ => ‘Articles’,
‘position’ => 250,
‘show_for_displayed_user’ => true,
‘screen_function’ => ‘buddyboss_child_list’,
‘item_css_id’ => ‘articles’,
‘default_subnav_slug’ => ‘public’
));
}
function buddyboss_child_list() {
add_action( ‘bp_template_content’, ‘profile_buddyboss_child_loop’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}
/*——- This is end of the code for above function ———*/
function profile_buddyboss_child_loop() {
$myposts = get_posts( array(
‘posts_per_page’ => -1,
‘author’ => bp_displayed_user_id(),
‘post_type’ => ‘post’
));
if( ! empty($myposts) ) {
foreach($myposts as $post) {
setup_postdata( $post );
if (has_post_thumbnail( $post->ID ) ):
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘sidebar-smallthumbnew’ );
else :
$image[0] = “…/wp-content/themes/Starkers-Child-2/images/vidimage.jpg”;
endif;
echo ‘<li class=”sidebar mostpop post-‘ . $post->ID . ‘”><div id=”postimage”>ID) . ‘”></div><div id=”postinfo”>ID) . ‘”>’ . get_the_title($post->ID) . ‘</div>‘;
}
echo ‘‘;
wp_reset_postdata();
} else { ?>
<div class=”info” id=”message”>
<p><?php bp_displayed_user_fullname(); ?> has No posts.</p>
</div>
<?php }
}
/* This is end of the code for above function */
remove_filter(‘bp_setup_nav’,”);
function count_user_posts_by_type( $userid, $post_type = ‘post’ ) {
global $wpdb;
$where = get_posts_by_author_sql( $post_type, true, $userid, true);
$count = $wpdb->get_var( “SELECT COUNT(*) FROM $wpdb->posts $where” );
return apply_filters( ‘get_usernumposts’, $count, $userid );
}
/* ——————————This is end of the code for post in profile above function——————– */It adds a new button on the user activity page and when the Message-Starred button is clicked it takes the user the lists of post page that the above function creates. How can I stop that fro happening. I really want to keep the starred message function and I don’t want to lose the lists of WordPress post in the user Activity page.
-
AuthorSearch Results
