WordPress.org

Forums

Non-WP homepage for multisite (11 posts)

  1. tirussell
    Member
    Posted 4 years ago #

    If I wanted my domain root-installed multisite setup to have a completely non-WP driven homepage (e.g., "hello world"), but retain all the other site #1 functionality (and not mess anything up on subsites either), will the following cause any problems down the line as my root index.php code?

    if ($_SERVER['REQUEST_URI'] != '/') {
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    } else {
     echo "hello world";
    };
  2. Probably not but ... why not use a static front page for WordPress? You can do just about anything with it, even make it look totally different from the rest of your site.

  3. tirussell
    Member
    Posted 4 years ago #

    The homepage will be tying into several data feeds from wordpress and elsewhere, and have a bunch of other PHP stuff going on so I don't think I want to use the usual "use a page as a homepage" technique.

    I guess what I proposed above was my guess at how to create a static homepage. Is there a better (probably more obvious!) way to do this just for the site#1 homepage?

  4. Nope, pretty much make that custom page the home.php in the theme template file you'll be using on the main blog.

  5. tirussell
    Member
    Posted 4 years ago #

    Ah - got it. All the blogs will have the exact same theme, except for the very root domain homepage (though pages and posts on this blog will be that same theme) - WordPress is going to be a university's full CMS with each subsite an office, student org, etc.

    I think it's a bit tidier to have this one bit of code than create separate themes just to accommodate a single exception.

    Thanks!

  6. Does it help if I mention there are literally hundreds of universities at this point using the network feature in the same way as your plans? :)

  7. I'd rather save myself the effort of reinventing the wheel and having to match themes/layouts by using the static front page.

    Laaazy :)

    And then if I decide I want some posts on the page, it's easy to pull 'em in (or let a non-tech edit the content).

  8. tirussell
    Member
    Posted 4 years ago #

    Andrea - thanks for the encouragement - I'm only aware of some. Do you know if they've got a meetup/forum/mailing list I can hop on?

    ipstenu - but if the the main homepage is wildly different from what I want the static homepages of the subsites to be, I'd have to create a separate theme that includes a home.php just for the root site, right? I totally agree about non-tech editing and pulling posts!

    Can I just say that it's really fantastic to have a support forum where people are so incredibly helpful? Go open-source! And goodbye clunky, stuck in the 90s commercial CMS!

  9. I can send you to
    http://dev.wpmued.org/ - an aggregator blog

    And also to jim groom.
    http://bavatuesdays.com/

    Hassle him a lot, he's a crazy man. Tell him I sent you. :D

  10. but if the the main homepage is wildly different from what I want the static homepages of the subsites to be, I'd have to create a separate theme that includes a home.php just for the root site, right?

    No, not really. You'd just have to style that home.php differently, I think. If all your home.php had in it was an embedded flash video, that would work, after all. You can leave off calls to header.php and footer.php (though that may impinge on your ability to pull in posts later).

  11. techHT
    Member
    Posted 4 years ago #

    I beleive I'm doing what I think you want

    In my root I have an index.php (for wordpress) and an index.html (for my non-WP portion of the site) My host gives priority to the index.php when coming to the site so when someone hits my site it is controlled by wp but they are redirected to my html page

    This is set up on my WP 'home' page (@ the bottom of page)
    I tell it to 'Point to' my index.html
    (this is done with http://wordpress.org/extend/plugins/page-links-to/)

Topic Closed

This topic has been closed to new replies.

About this Topic