Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to create a custom home page + login form

  • Avatar of Anton
    Anton
    Participant

    @antonrsa

    I have created a template page and added the buddypress login html form that can be found on sidebar.php. The template page includes some text explaining what the network is about and the login form. I have made the page full width and excluded the sidebar from that page. Everything works well with members being able to login with that form but once they are logged in, that page (I’ve set it as the home page on the dashboard settings) is still visible including the form when they browse to “home”.

    Is their anyway that the template page I have created is not visible any more once a member has logged in? In simpler terms, is their a way once a member is logged in through that page that the “home” page is the activity stream?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avatar of techguy
    techguy
    Participant

    @crashutah

    A couple ways to do this I think. One is to just redirect people that aren’t logged in to your login page. That way if they hit the home page, they’ll just get sent to the login page if they’re not logged in. There’s a few recent threads with ways to do it and some plugins I think also. Then, you’ll want to exclude the login page from the Nav too in your theme.

    It seems like you could also do this with a child theme where you just check is_user_logged_in() and based on that display the activity or login. I haven’t looked into this much, but it seems reasonable. There’s probably an activity template you could include using locate_template()

    Avatar of Anton
    Anton
    Participant

    @antonrsa

    Thanks @techguy

    I’ve added an if statement on the template page underneath get header section to check if the user is logged in and then redirect them with bp_core_redirect but it gives the error of “Warning: Cannot modify header information – headers already sent by…./pluggable.php on line 868″

    I’ve replaced that with javascript redirect: window.location = “http://mydomain.com/activity” but I’m not to keen on using javascript for redirection.

    Avatar of Tore
    Tore
    Participant

    @toregus

    I solved this by having two different blogs. One as a frontend and the second for BP.

    Avatar of techguy
    techguy
    Participant

    @crashutah

    You’ll have to hook the bp_core_redirect to one of the initial load actions. That way you check to see if the user is logged in before the headers load and then you get the redirect error.

    Avatar of Josef
    Josef
    Participant

    @joey545

    You could also modify the header template to display a separate nav for logged in users where the home page points to the activity stream (or profile), even though the home page is still accessible the home link in the navigation will direct users to the activity stream (pros: easy implementation, cons: no real home page redirect)

    Avatar of xavieremerson
    xavieremerson
    Member

    @xavieremerson

    hi,
    I’m very new to buddypress, could you tell me how you crated the login page?

    I’m also made a template page which contains side bar logo form . but when i access the login page via siteroot/login the page not error occured. ‘The page you were looking for was not found’

    could you help me?
    please …

    Thankz in advance

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

You must be logged in to reply to this topic.