Changing index page when logged out

I'm making my social network like Facebook, so you have to log in to get into things, and I'm encouraging users to keep things private and only visible to friends.

However, all this means that the front page before login looks very boring, because it's just the default recent activity one.

I've tried searching around but I haven't seen a way to just edit the index for when you're logged out.

Is there a file I can edit in my server to change the homepage for when you're logged out? I just want to get rid of the recent activity box and put a welcome one there where I'll write a bit about the site.

Thanks in advance.

  • there's a plugin called custom_index where you can edit the entire front page. you can then use the isloggedin() function in an if statement to show content for logged in user and for guests. if you need further help with this then just send me a message :)

  • I'm not an expert coder, I can understand what most of the code is doing but I would have no idea how to add if statements myself I'm afraid.

  • Cim is right. That's the only way to do it. To change the home page, enable custom_index plugin that comes with elgg and modify the following directory -


    If you want the A element visible only to the logged-in users and B to logged-out ones, do the following coding -

         if (isloggedin()) {


    <?php } else { ?>


    Now replace A and B with your elements.