Skip to:
Content
Pages
Categories
Search
Top
Bottom

Modifying the BP Profile as Homepage to make the activity page as homepage

  • @btmullins

    Participant

    Hey everyone. I have been tinkering around with the BP Profile as Homepage, to get it to set the activity page as the homepage for logged in users but have had no success. I think the activity page would be ideal homepage for logged in users as it makes available a way for users to see what is going on, as well as a way for them to easily post to the groups they are in. I can partially do this with the Settings/Reading options but it only works for all users, and I would prefer non logged in users to see the homepage I have set up (which is 3 blog posts describing the site).

    Below is the code for the plugin, does anyone have any suggestions?
    `
    function bp_profile_homepage()
    {
    global $bp;
    if(is_user_logged_in() && $_SERVER==’/’)
    {
    wp_redirect( $bp->loggedin_user->domain );
    }
    }
    function logout_redirection()
    {
    global $bp;
    $redirect = $bp->root_domain;
    wp_logout_url( $redirect );
    }
    add_filter(‘get_header’,’bp_profile_homepage’,1);
    add_action(‘wp_logout’,’logout_redirection’);
    `

    TIA!

    Brandon @ moonbooks.net

  • The topic ‘Modifying the BP Profile as Homepage to make the activity page as homepage’ is closed to new replies.
Skip to toolbar