Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing default INDEX?

  • @porscheheritage

    Participant

    Hello All,

    Is there a way to change the “main page” (index.php) to another page on BuddyPress?

    For example:

    http://www.my-websight.com/index.php is the default BP installation

    but, I want it to be

    http://www.my-websight.com/some-other-page-of-my-choice.html

    currently im using the HTACCESS method. which is:

    RewriteRule . index.php [L]
    DirectoryIndex main-splash-page.html

    (Ive added the DirectoryIndex) which changes my “default index”

    It seems to work the way I want it to. However, I fear unintended consequences.

    Question:
    1) Is there a preferred way to do this?
    2) Are there any checks/hooks on BuddyPress or WordPress that would be aggrevated by me adding/specifying a “DirectoryIndex”
    3) Is this just a wordpress no/no?

    FYI: Im on WP 3.0 – latest BP (upgraded from WPMU)

    cc:
    @DJPaul
    @crashutah
    @johnjamesjacoby

    **any thoughts?

Viewing 8 replies - 1 through 8 (of 8 total)
  • @porscheheritage

    Participant

    any thoughts on this guys?

    @crashutah

    Participant

    Why not just use a child theme and modify the index.php to show whatever you want the page to be? You could also make it show one thing for logged in and one thing for not logged in. You probably could even look at referring page or set a cookie or something to know if it’s the first time they’ve been or not.

    @porscheheritage

    Participant

    @techguy

    creating a whole new “child theme” vs.. ONE LINE of httaccess

    seems like an easier choice to just add that one line of httaccess

    @crashutah

    Participant

    Almost always multiple ways to do it in WordPress. Depends on what type of changes you might want to make in the future.

    @bpuser44

    Participant

    John, interesting. But how do you “show one thing for logged in and one thing for not logged in” /index page? Just with coding on the one page/template set for home or create a whole new page template?

    @crashutah

    Participant

    @bpuser44 It’s really simple. I did it as one page template that was set as the home page. Then, in the page template you just add this code:
    if ( is_user_logged_in() ) {
    //Content you want people to see if they’re logged in
    } else {
    //Content you want people to see if they’re not logged in
    }

    @rogercoathup

    Participant

    @porscheheritage :

    you can do this very simply from your wp-admin backend –

    Goto “settings … reading … front page displays:”

    [if you want to do anything more complex, child themes (as suggested by @crashutah) aren’t too much work – you can create a bare bones one just with style.css , and inherit everything else from the bp-default theme. If you are making any mods to design / layout of your site, this is the way to go anyway.
    https://codex.buddypress.org/how-to-guides/building-a-buddypress-child-theme/ ]

    @porscheheritage

    Participant

    Thanks for the reply guys!

    Hat tip* to @rogercoathup @crashutah

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Changing default INDEX?’ is closed to new replies.
Skip to toolbar