Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi,

    I’m trying to do much the same as the original poster was trying to do. I am working on converting my website layout from using iframes to one using divs and css.

    I want to have my wordpress blog show up on the main page of the site, contained within a div. I need to use a php include to do this with. The index for my site has a side bar that uses php includes (PHP Currently, latest fanlistings joined code–as examples of why the main page has to have a .php extension).

    When I started out on this project, I thought it would be easy to get wordpress incorporated, but hours of frustration later, I’m ready to pull my hair out.

    As a reference to what I’m trying to do, the iframes version of the site is at http://www.written-in-stars.net/layout1.shtml. A crude version of the div/css based layout is at http://www.written-in-stars.net/test.php. It’s this second version that’s giving me fits.

    In my original attempt, I used this piece of code on the “test.php” site.

    <div id=”content”>
    <?php include(“./wp/index.php”); ?>
    </div>

    When I loaded the page into my browser, rather than my wp blog showing up, I ended up getting back this:

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /home/drbrun0/public_html/wp/myindex.php on line 3

    Fatal error: main(): Failed opening required ‘./wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/drbrun0/public_html/wp/myindex.php on line 3

    On the layout1.shtml version of the site, the index shows up fine. Also, if you just put in http://www.written-in-stars.net/wp/index.php, the index shows up perfectly fine.

    So, I sat out looking for a solution and stumbled across this post, and started trying the things recommended above.

    First, I tried this piece of code (again, on the test.php page):
    <div id=”content”>
    <?php
    require(“wp/wp-blog-header.php”);
    include ‘wp/index.php’;
    ?>
    </div>

    I ended up getting back:
    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /home/drbrun0/public_html/wp/index.php on line 3

    Fatal error: main(): Failed opening required ‘./wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/drbrun0/public_html/wp/index.php on line 3

    Again, the layout1.shtml version and the index.php page on its own both work perfectly.

    So, my next stab at this was to follow the suggestion of making the “myindex.php” file. To make this file, I took the original index file, copied it into a new file, and chopped out this part from the top:

    <?php
    /* Don’t remove this line. */
    require(‘./wp-blog-header.php’);
    ?>
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”http://www.w3.org/1999/xhtml”&gt;

    Nothing else was changed.

    On the test.php page, I changed the code to:

    <?php
    require(“wp/wp-blog-header.php”);
    include ‘wp/myindex.php’;
    ?>

    Then, I uploaded the whole mess. On the test.php page, I got back this message:

    Sorry, no posts matched your criteria.

    Powered by WordPress

    Loading http://www.written-in-stars.net/wp/myindex.php directly into my browser results in a blank page. I haven’t tried loading the myindex.php into the layout based on iframes and seeing if it works. I suspect it wouldn’t though.

    In additon to the above, I also tried the steps included on the “Have WordPress files and blog in different directories” page. That didn’t work either.

    This is probably such a simple thing to do, but it’s driving me crazy. I’m actually getting to the point of seriously considering using different blogging software. I perfer the admin/posting areas of wordpress, but if the blog isn’t going to show up….

    Much thanks in advance.

Viewing 1 replies (of 1 total)