WordPress.org

Ready to get started?Download WordPress

Forums

SSI (9 posts)

  1. gesiwuj
    Member
    Posted 8 years ago #

    How can I include a WP Blog in a page using SSI? I am using the following code and it wont work:

    `<?php require("http://www.ges-net.com/wp/index.php"); ?>

  2. moshu
    Member
    Posted 8 years ago #

    No, you cannot use URL in an include, only server path, as far as I know...

  3. gesiwuj
    Member
    Posted 8 years ago #

    I tried a server path and that wont work :(:

    <?php require("/wp/index.php"); ?>

  4. moshu
    Member
    Posted 8 years ago #

    Oh, I just re-read your question.
    SSI and PHP dont work together. They are two different animals. I don't know what are you trying to do, but it will not work in this way.
    If you can, try to describe what exactly would you like to achieve (instead of asking useless questions) and then maybe somebody will come up with a solution.

  5. gesiwuj
    Member
    Posted 8 years ago #

    OK, I have a homepage, which I want to include my blog in. I really don't want to recode my homepage as a WP Theme.

  6. moshu
    Member
    Posted 8 years ago #

    Maybe you can get some ideas from here:
    http://www.transycan.net/blogtest/2005/07/05/integrate/

  7. lohnunternehmer
    Member
    Posted 8 years ago #

    I doubt it to work with ssi (you sure you mean the right thing?) or php. The site-URI to include always changes but how could the include-code know what's the next site to include? Confusing...

    Check out this code

    <iframe src="http://www.ges-net.com/wp/index.php" width="700px" height="500px"></iframe>

    Haven't used this myself, but it should work. Very easy, isn't it?

  8. gesiwuj
    Member
    Posted 8 years ago #

    When making my blog theme, my idea was to have it in an iframe, an when I got fed up of writing my own, I asked a freelancer for a quote, and he said tht iframes will be removed on the next set of browsers or something. By the way, that code is a way of making Server Side Includes in a PHP file. (or thats what W3 Schools and my PHP book say).

  9. Kafkaesqui

    Posted 8 years ago #

    The freelancer you mention sounds like an idiot (sorry, but sometimes there's no better way to put it).

    The issue with PHP and SSI is, there are ways to *include* SSI stuff in a PHP document, but there's no way to include PHP files--and have them be properly parsed and function as PHP--in an SSI/shtml document. Which are you attempting?

Topic Closed

This topic has been closed to new replies.

About this Topic