Forum Replies Created
-
Iv’e got the activity directory page set as the front page, so I thought it would still work. bp_is_activity_directory() looks like the best one though. Thanks @r-a-y
Thanks @r-a-y that does work for the front page, but
bp_is_component_front_page( 'activity' )
or the one I just suggestedbp_is_activity_front_page()
doesn’t seem to work correctly when using the activity parse args filter. The best solution I’ve got now is using! bp_is_user() && bp_is_current_component( 'activity' )
This makes this work correctly:/* Display just the activity updates for who the the logged-in user is following and updates from the logged in user*/ function am_activity_filter( $retval ) { if ( ! bp_is_user() && bp_is_current_component( 'activity' ) ) { $retval['scope'] = 'following,just-me'; $retval['action'] = 'activity_update'; } return $retval; } add_filter( 'bp_after_has_activities_parse_args', 'am_activity_filter' );
The problem with this conditional
bp_is_component_front_page( 'activity' )
in my activity parse args filter is activity items keep showing from everyone instead of the items from who a user is following (I’m using your master follow plugin). The items that are not supposed to display, disappear when the user refreshes the page which makes the correct items display, but they keep coming back through the ‘load newest’. Have you tried this? Nevertheless! bp_is_user() && bp_is_current_component( 'activity' )
is the one that is working correctly for this.So this will probably be the last time I ask a support question on my mobile.
I just wanted to know if a conditional for the URL mysite.com/members/user1 exists but I don’t think it does.
By the way, what do you call this page anyway:
mysite.com/members/user1
I’ve been calling it users homepage
I Apologize for not being clear.
If I asked someone for the conditional for the homepage on a wordpress site, they’ll say
home_url
If on a multisite and I wanted a conditional for both the multisite homepage and a user homepage, the’ll say
network_home_url
for the multisite homepage andhome_url
for a users homepage.What is the homepage for a users homepage on buddypress? When I say users homepage, I’m talking about the page that displays as soon as you click on a member in the members directory, so for member chris the homepage is on mysite.com/members/chris
What is the conditional for when the page is on a users homepage like mysite.com/members/chris
I’m saying I don’t think there is a conditional for it,
bp_is_user
displays on all users pages but I just want it for the users homepage.I haven’t tested this code, got it from another site, lets say you wanted to display a link when you are viewing a users page:
global $bp; if ( bp_is_user() ) { ?><a href="<?php echo $bp->displayed_user->domain; ?>" >This links back to users homepage</a> <?php }
how would you write this so this code doesn’t show on the users homepage? as we don’t want this link to show when we are already on the homepage
global $bp; if ( bp_is_user() && ! the_conditional_for_a_users_homepage() ) { ?><a href="<?php echo $bp->displayed_user->domain; ?>" >This links back to users homepage</a> <?php }
I don’t think there is a conditional for it as I’ve looked everywhere for it.
bp_is_user()
won’t work because I need itonly
for:
example.com/members/user
Not
example.com/members/user
andexample.com/members/user/profiles
andexample.com/members/user/friends
etc.So far it appears there is no conditional for it.
Thanks for your help.
That’s for the profile component:
mysite.com/members/example-user/profile/
mysite.com/members/example-user/profile/edit/
mysite.com/members/example-user/profile/change-avatar/I’m looking for a conditional for only:
mysite.com/members/example-user/
I call mysite.com/members/example-user/ the main profile page as that is what I’ve seen others call it but I think I’ll call it the users homepage from now on. So yeah I’m basically looking for the conditional for mysite.com/members/example-user/
That’s where it is.
I’ve always created sites in the admin, and since I’ve never tried BuddyPress with multisite, I was wondering how a user that doesn’t have access to admin would create a site when they are registered as a subscriber, as you can’t create a sites in the sites tab. But it shows in that drop down on the right.
Thanks for your help.