Skip to:

Ideas for my website, need guidance

  • Baconbits


    Hello all, I’m a novice (but learning) with regard to all server side scripting (I am only familiar with static html).

    I have a lot of ideas for my WP/BuddyPress website that I need guidance with, I am using a modified version of the Frisco BP child theme.

    1. I want to restrict access to Buddypress specific pages (forums, groups, activity feeds, profiles, etc) but keep blogs/articles 100% public and accessible through search engines. From my research I have created a bp-custom.php file in my plugins that redirects unregistered users to sign up. This is the part of the script:

    function restrict_access(){
    global $bp, $bp_unfiltered_uri;

    Is there a way to edit this to only limit it to certain pages and not globally? If not may I have a script to add to specific pages I want unauthorized to the public to refer them to the register page.

    2. I will not be creating multiple networks (as in I want all content available throughout the entire network. I would like each users profile to have a “works contributed” section either showing their most recent, most popular, or a link to ALL of their works. Is this possible and how?

    3. For users who are adding a post, I would like them to have an option to select “public”, “friends only”, “private” for each post they make. Obviously public would be visible site wide and included in search engines; where friends only/private would be limited to their friends/groups, and private would be for their eyes only i.e. diaries. This may not be possible, but if it can be done or something close to it is possible please let me know.

    4. I would like users to be able to BLOCK other users / set their accounts to private (non friends can’t even see they exist) they would have to friend request others in order to be seen. Is this possible?

    That’s about all for today, I appreciate any help.


Viewing 6 replies - 1 through 6 (of 6 total)

  • peterjhead


    Try this in bp-custom.php

    function bp_non_member_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {

    if(!is_user_logged_in()) { // not logged in user
    wp_redirect( get_option('siteurl') . '/register' );
    } // user will be redirect to any link to want

    NOTE: If your using sitewide forums instead of group forums you will need to remove the comment /* */ around:
    || bbp_is_single_forum()
    in the above code. Merry Christmas!



    Thank you Peter! I am in a hurry to go hit the holiday festivities and will try to use your script later, I’ll let you know how it goes.

    Merry Christmas to you as well!



    Sorry I meant to mention this takes care of only number one of all the questions in your thread.

    Ben Hansen


    hi there i’m not so much of coder but i’m thinking i’ll chime in here anyway but most of what you are looking for usually falls under the umbrella of what plugins normally do. some people like to make their own i not being a programmer tend to go with whats already been done for the most part.

    #1 you might want to check out s2 members plugin does everything you are looking for in #1 and more but then again that’s not always desirable just saying you might want to check it out.

    #2 what you are saying here seems to be a non-sequiter if you actually meant to say site instead of network however it sounds like you actually want to be giving new users Author or Contributor users roles which is actually just a WordPress thing and has very little to do with BuddyPress itself other then possible a hook into the public profiles but again this sounds like something that might also be handled by a plugin especially with regards to reordering the content. Be advised this information already exists on a contributors author page which again sort of a WP thing and not really a BP thing.

    #3 is already sorta possibly already similar to the last thing any post (wp thing) can be set to private or password protected but tying that access to different BP connections once again sounds to me like some a plugin might do.

    #4 i don’t follow this one either if nobody can see each other how would they ask them to be friends? if you wanted to do such a thing it once again sounds like a plugin.

    plugins that do what you are looking for may or may not exist, you will need to do some research or perhaps build them yourself. Like i said before i’m not actually a programmer but from what i hear WP/BP plugin coding is relatively stratiforward if you are proficient in php.

    Cidade Sonho


    Hello, my bp-custom.php


    // **** Privacy ********
    function restrict_access(){
    global $bp, $bp_unfiltered_uri;

    // If user is not logged in and
    if (!is_user_logged_in() &&
    // The current page is not register or activation
    !bp_is_register_page() &&


    ) {
    // Redirect to registration page. Change /join to your register page slug
    bp_core_redirect( get_option('home') . '/wp-login.php' );

    add_action( 'wp', 'restrict_access', 3 );

    But I have the Facebook Login Button and don´t work with restrict acess, help me?

    When Login with Facebook Button return to /wp-login.php and don´t login 🙁

    thanks 😉

    Cidade Sonho


    The Facebook have a javascrip callback url.

    With Restrict Acess, the javascrip callback the wp-login

    sorry for english


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ideas for my website, need guidance’ is closed to new replies.
Skip to toolbar