Hi,
I’m using Version 1.7-beta1 and wish to restrict access to the buddypress areas of a wordpress site to logged-in users.
I’ve seen code to do this and tried placing it in bp-custom.php but have had no luck. Does anyone have any code that works with 1.7. I don’t need anything fancy, just redirect to register/login page if anyone tries to access buddypress pages.
many thanks
@discdemo please don’t bump if less than a day as we’re all volunteers here living in different time zones. That said, I’ve checked out the site and the sidebar width is 224px less 40px padding = 184px space for the image. The ad you have there is 203px wide, hence the image was cut off.
About the available themes: if you upgrade to BP 1.7 beta 1 download at https://buddypress.org/2013/02/buddypress-1-7-beta-1/ you can use any WordPress theme which does not override core templating system and you’re good to go. Caveat is that only a few BP plugins have been upgraded for BP 1.7 beta 1 compatibility.
You will have to create a custom menu.
https://codex.buddypress.org/user/setting-up-a-new-installation/how-to-set-up-your-main-site-navigation-using-the-built-in-wordpress-menus/
Then check the box beside register then add to menu. Save and refresh your front end to see the new menu with the register page.
Hi @jcangler,
you have to activate BP only once, on the main site.
The main site is the WP declared as network. In the network admin you install BP as plugin. And BP would only be managable from within the network admin. And that’s right so !
Now this site is network enabled and is using BP. If you want install other blogs, do so from your network admin. Those blogs are all included into BP activities. There is no need to install BP on each secondary blog. This cannot work.
https://codex.wordpress.org/Installing_Multiple_Blogs
https://codex.wordpress.org/Create_A_Network
https://codex.buddypress.org/user/setting-up-a-new-installation/installation-wizard/
This drove me a bit nuts. I figured out how to do it though and it’s very easy.
With buddypress installed it takes over the registration entirely and ads this activation email which is outside the normal header load so it;s outside of the functions.php call include.
The way I got it to work was by adding a call to the welcome email action after the do_action( ‘bp_after_activation_page’ ); in plugins/buddypress/bp-themes/bp-default/registration/activation.php file.
Near the end of the file you see this.
do_action( ‘bp_after_activation_page’ );
Add the following
do_action( ‘welcome_email’ );
Now this may work because I am using a plugin to modify the welcome email to begin with. I am using SB Welcome Email Editor
As for why someone would need to send the user their id and password. I needed this because people can sign up using a name with spaces but the id is created with a dash in place of spaces so they may never know their id isn’t what they saved it as. I also added a condition on the id entry to force them to not use spaces but I like to cover all bases and let them know what they signed up with.
Hope this helps.
Hi, 🙂
updated buddypress to 1.6.4 on a wordpress 3.5.1
In buddypress.org website, there is “Favorite topics” and “subscribed topics”. I don’t have them on my installation. note that I’m using the old buddybar, but that’s not the problem, because even the link to the favorite/subscribed topics on my website shows me a 404 page.
I wanted to have these functions. I searched but didn’t find anything relevant.
Thank you in advance 🙂
Hi
I have 3 questions that are related:
1. Is it possible to get two different roles to have two different types of user with different profiles?
I want have two different roles (e.g. company and person) with different profile content.
E.g. the user Company should have different profile fields than the user Person.
The user Person should have for example a field for birthday but the company not because it doesn’t make sense.
Is that possible?
2. Another thing what would be great is to have a group in the profile for picture upload of recent work of the Person.The Company shouldn’t have that. Would that be possible too?
3. Can the different User (Company and Person) get a different theme? Is it possible with “Theme my login”-plugin or is there something else?
Thanks a lot
My versions:
Wordpress 3.5.1
Buddypress 1.6.4
So I’m trying to enable multiblog on my multisite network so all sites can access BP content, but it doesn’t seem to be working. Here’s what I’ve done:
– using WordPress 3.5.1. and Buddypress 1.6.4
– I defined BP_ENABLE_MULTIBLOG as true in wp-config
– network activated buddypress in the network admin
– activated buddypress in the single site’s admin
After activating buddypress in the site admin, the buddypress panel doesn’t show up in the settings tab in the dashboard. It is only accessible through the network admin.
Am I doing something wrong here? Thanks in advance for your help.
I’m not sure that I’ve seen a huge amount of demand for event plugins specifically for BP in my experience. I hear more about media galleries, but again, it’s infrequent. It took a long time for WordPress itself to get a better media upload/interface. There’s no technical reason why a simple plugin couldn’t be built to use that.
The scope of the problem (“what is a media gallery”) is pretty huge, and means different things to different people, and I bet that any new plugin that picked a focused implementation which isn’t going to be ideal for everyone.
I use this on my site to show a different single.php. I have a folder mobile in my theme folder with my mobile templates. I copied single.php, removed the get_sidebar and then added css when on mobile to style it better. This code works in functions.php.
`function mobile_filter_wp_template( $template ) {
$overridden_template = dirname( __FILE__ ) . ‘/mobile/mobile-single.php’ ;
if ( is_single() && wp_is_mobile() ) {
return load_template( $overridden_template );
} else {
return $template;
}
}
add_filter( ‘template_include’, ‘mobile_filter_wp_template’, 10, 2 );`
`function mobile_style() {
if ( is_single() && wp_is_mobile() ) {
echo ”
<style>
body {
width: 100%;
}
</style>”;
}
}
add_action(‘wp_head’, ‘mobile_style’);`
Use WP is_page to set conditions to specific pages https://codex.wordpress.org/Function_Reference/is_page
You should set up WP fully first checking all aspects of a standard WP install work correctly, when that checks out proceed to activating BP and doing so with the default theme initially to establish BP is set up correctly and working fully only them move on to activating a third party theme.
Hi,
Yes i am doing it on a live site. . Good point on compatibility , i just checked the theme, and it says its compatible with BuddyPress 1.6.1, BuddyPress 1.6, BuddyPress 1.5.3, BuddyPress 1.5.2. i’m downloaded the current version which is 1.6.4. .should that be a problem? (I’m using a theme from themeforest called detube)
Will someone please help a poor frustrated soul? I’m a total beginner at all things WordPress, Buddypress and even further, CSS, PHP, etc. and I think this is an easy question, I just can’t figure it out.
I’m trying to make my child functions.php override the parent one in Buddypress 1.6.4 Default theme, but I can’t get any of it to work and it’s driving me bananas. Using the following code in the parent functions.php, I was able to change the default “wordpress@yourwebsite.com” email address but that’s obviously not sustainable as any update with wipe it clean. How do I make it work in my child theme?
Thanks,
Carlos
function res_fromemail($email) {
$wpfrom = get_option(‘admin_email’);
return $wpfrom;
}
function res_fromname($email){
$wpfrom = get_option(‘blogname’);
return $wpfrom;
}
add_filter(‘wp_mail_from’, ‘res_fromemail’);
add_filter(‘wp_mail_from_name’, ‘res_fromname’);
I was hoping someone could help me with this problem. I have WordPress 3.5.1 and Buddypress 1.6.4. The friends tab is displaying the wrong count when looking at a users profile. I have seen this problem recorded before and have tried all of the solutions suggested but none seem to work. If anyone has any insight or suggestions I would greatly appreciate it. Thanks in advance for your help!
Are you doing it on a live site? Is your Theme BuddyPress compatible. For BuddyPress 1.6.x, the BuddyPress features are only available to BuddyPress enabled theme. In BuddyPress 1.7, BuddyPress automatically supports all themes(but 1.7 is still in beta and not recommended for live site).
Are there any special network settings i need to authorise for buddypress to operate?
Hi Thanks Brajesh,
found the settings buddypress tab and clicked through. but no configuration wizard to speak off
all i see are the tabs across saying – components (with 10 active, and 2 must use), pages, settings and forums (where i installed the configure site wide forums). . checked again in the wordpress site, and still buddy press hasn’t shown up. .
Should i be installing buddypress 1.7 perhaps?
You will need to configure BuddyPress before it comes into action.
Look for the notice in the Network admin. If it is not there, just click Network Admin-> Settings->BuddyPress and you should see the configuration wizard.
Hope that helps.
HI there,
I’ve just set up a website as a wordpress multisite, and created a wordpress site.
Installed buddypress and network activiated it, but can’t see any evidence of it in my wordpress site? wondering have i missed something in the installation?
I’ve instsalled Buddypress 1.6.4 on a wordpress multisite version 3.5.1
thanks
Derrick
@p2ab BuddyPress does not work on installations where you give WordPress its own directory per your link above https://codex.buddypress.org/user/before-installing/#system-and-server-requirements
Hi, I am using the code below found on this support page to have a new tab on the Member page. Inside it I want to display a certain post (I have the permalink) and to do that I need to transform the permalink into the post ID. In the WordPress Codex url_to_postid() does just that. But it doesn’t work on the Member page. It works like a charm everywhere else.
Surely I am doing something wrong.
`
//Displaying a new tab
function my_test_setup_nav() {
global $bp;
bp_core_new_nav_item( array( ‘name’ => __( ‘test’ ), ‘slug’ => ‘test’, ‘parent_url’ => $bp->loggedin_user->domain . $bp->slug . ‘/’, ‘parent_slug’ => $bp->slug, ‘screen_function’ => ‘my_profile_page_function_to_show_screen’, ‘position’ => 80 ) );
bp_core_new_subnav_item( array( ‘name’ => __( ‘Home’ ), ‘slug’ => ‘test_sub’, ‘parent_url’ => $bp->loggedin_user->domain . $bp->slug . ‘/’, ‘parent_slug’ => $bp->slug, ‘parent_slug’ => $bp->slug, ‘screen_function’ => ‘my_profile_page_function_to_show_screen’, ‘position’ => 20, ‘item_css_id’ => ‘test_activity’ ) );
function my_profile_page_function_to_show_screen() {
//add title and content here – last is to call the members plugin.php template
add_action( ‘bp_template_title’, ‘my_profile_page_function_to_show_screen_title’ );
add_action( ‘bp_template_content’, ‘my_profile_page_function_to_show_screen_content’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}
function my_profile_page_function_to_show_screen_title() {
echo ‘something’;
}
function my_profile_page_function_to_show_screen_content() {
//get the permalink
$url = get_bloginfo( url ).’/’.bp_get_displayed_user_username().’/post-name/’ ;
//transform the permalink in ID and display post
$my_postid = url_to_postid( $url );
$content_post = get_post($my_postid);
$content = $content_post->post_content;
$content = apply_filters(‘the_content’, $content);
$content = str_replace(‘]]>’, ‘]]>’, $content);
echo $content;
}
}
add_action( ‘bp_setup_nav’, ‘my_test_setup_nav’ );`
Everything works, I’ve tested it, the problem is with the url_to_postid() function. I am not using custom posts.
Thank you.
Wordpress: 3.5.1
buddypress: 1.6.4
site url: http://alchemy-tm.com/register/
The problem is that, I can’t see any field under the “profile details” section.
because of that my register page is not working. when i click on submit nothing happens.
I have customized the register page to fit my custom theme. I have also tried the default buddypress theme to check if it shows there. but it doesn’t.
i have the same setup on my local server. Where i have wordpress 3.5 and there i can see the “name(required)” filed under profile details.
I don’t know how to solve it. Please help 🙁
Hi,
for me it is the same. Searching just returns posts from wordpress but nothing from BP.
Is there a setting for BP that enables search through posts and comments from BP?
@unsalkorkmaz please note that I have edited one of your posts above. No personal remarks/attacks are allowed in this forum.
I appreciate that you want to give users as many features as possible with your theme and I understand your frustration. Having said that, the WP Theme Review Team Admin already noted which he considered plugin territory starting here https://lists.wordpress.org/pipermail/theme-reviewers/2013-March/012183.html and more so for the TinyMCE buttons later on the thread.
I supported you in the Author URL in the same thread. While I don’t agree with the TRT Admins 100% of the time, I support them 100% in the above-mentioned plugin-territory discussion. My unsolicited suggestion is to remove the items listed above which are considered plugin territory from your theme and create a plugin specifically for the theme e.g. Firmalite Theme Booster or Firmalite Add-ons or whatever you want. Further suggest submitting a revised theme while your theme is still up in the review queue.
Firmalite is the 13th in theme review queue as I write this. We’ve cleared many of the backlogs the past week and there are reviewers doing some reviews this week. Know that all of the reviewers are volunteers and also know that way sometime ago the waiting time for a review was 3-4 months.
Thank you for your patience.