Skip to:
Content
Pages
Categories
Search
Top
Bottom

two page home page?

  • Avatar of villnoweric
    villnoweric
    Participant

    @villnoweric

    Hello Pressers.

    I would like two have two pages be on the home page. When you go into settings-reading it gives you the static page option for one page all the time. I would like to redirect logged out users to the register page, and if you are logged in i want it to show the activity stream.

    Also if there is a way to rename the home button in the navigation bar to activity feed, that would be great.

    I am using default bp-theme, and custom language file. I will take plugins.
    everything up to date.

    Any help is welcomed!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @villnoweric
    Try this it is a slightly modified snippet I did earlier but fits your requirement. Follow the instructions in the code.`
    // PLEASE NOTE FOR THIS TO WORK:
    // Before adding this code to bp-custom.php
    // http://codex.buddypress.org/developer/customizing/bp-custom-php/
    // you will need to create a new page in the dashboard and name it
    // something like “Dummy Page” for example or any name you choose.
    // Do not add this page to your menu because it is just a dummy page
    // for the redirect. Then go to Dashboard/Settings/Reading.
    // Under “Front page displays” select “A static page.” Then use the
    // “Front page” drop-down menu to select the page you created. In my
    // example for instance I selected “Dummy Page” for my front page.
    // Done! Now logged out visitors get redirected to the register page,
    // and logged in users get redirected to the activity stream.

    /* Redirects to profile upon login, and logged out users are redirected to register page */
    function bp_help_redirect_to_profile(){
    if( is_user_logged_in() && bp_is_front_page() ) {
    bp_core_redirect( get_option( ‘home’ ) . ‘/activity/’ );

    }else {
    if ( !is_user_logged_in() && !bp_is_register_page() && !bp_is_activation_page() )
    bp_core_redirect( get_option( ‘home’ ) . ‘/register/’ );
    }
    }

    add_action( ‘get_header’, ‘bp_help_redirect_to_profile’,1 );
    `

    Avatar of villnoweric
    villnoweric
    Participant

    @villnoweric

    Thank you! Just what I needed! Now I would like to know a way to rename the home button in the navigation bar to activity feed.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @villnoweric
    Just remove Home from the menu, then add activity to your custom menu. Then change the navigational label to “Activity Feed” or whatever you wish!

    Avatar of villnoweric
    villnoweric
    Participant

    @villnoweric

    Ok thank you.I just left the office so I will try when I get home.

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

You must be logged in to reply to this topic.