WordPress.org

Ready to get started?Download WordPress

Forums

Problems: PHP-INCLUDE wordpress/index.php (5 posts)

  1. adamyoung
    Member
    Posted 8 years ago #

    Hi. I am in urgent need of help. Here is a run down of what's going on:

    I was an MT user. I am migrating to wordpress. Basically, I have a website where I simply used the PHP INCLUDE to include the /mt/index.php where I wanted the news posts to show up. I am trying to do the same with wordpress but I recieve errors. This worked no problem with MT... All I want to do is have the posts/articles to show up in the text body of an existing webpage. I don't want to keep using MT but will have to if I can't fix this easily.

    The line in my php document:
    <?php include("wp_newswire/index.php"); ?>

    And the error message I recieve:

    Fatal error: main(): Failed opening required './wp-blog-header.php' (include_path='.:/usr/local/lib/php') in /homepages/20/d113155622/htdocs/wp_newswire/index.php on line 4

    Once I get this working, I will edit my template to match my MT one - it basically just hides/discludes all the extra items so all that is displayed is the posts and not the search and archives and all the extra hyperlinks.

  2. moshu
    Member
    Posted 8 years ago #

    1. Never a good idea to include a whole file with head and everything (you will end up with the head sections, two bodies etc.)
    2. Does this help?
    http://www.transycan.net/blogtest/2005/07/05/integrate/
    see Scenario #1

  3. adamyoung
    Member
    Posted 8 years ago #

    It's semi helpful, but I'm not sure it's going to function the way I want. I basically need to include everything as-is. The header and things will be hidden or removed from the theme. Any ideas?

  4. adamyoung
    Member
    Posted 8 years ago #

    I need users to be able to comment and everything seemlessly without taking them to something else outside the site. MT was nice for this, I just included the index.php and that was all there was to it. I then edited the MT theme to match my site and disclude all the extra text so only the posts displayed.

  5. shannonkay
    Member
    Posted 8 years ago #

    I am having pretty much the exact same problem. On my site I use php to include every page. I am moving from a software called CuteNews, and I've used others like MT with no problem. I'm looking to try WP because there are so many other plugins available for it, and I want to try more mobile posting abilities. I removed the header/footer/sidebar from my template so that when I went to wordpress/index.php It showed up fine and plain with just the post information. When I tried to include wordpress/index.php I get the same error as adamyoung. Any other ideas? Here's hoping we can get it figured out.

Topic Closed

This topic has been closed to new replies.

About this Topic