• If I have my WordPress index in a different directory (/wordpress/index.php), how do I use php includes to place it in my site’s index file? I tried

    <div style=”position:absolute;left:24px;top:286px;width:270px;z-index:1;” align=”justify”>
    <?php include(“home/username/public_html/wordpress/index.php”); ?>
    </div>

    but I get the following errors:

    Warning: main(home/vibrant/public_html/wordpress/index.php): failed to open stream: No such file or directory in /home2/vibrant/public_html/blog.php on line 3

    Warning: main(): Failed opening ‘home/vibrant/public_html/wordpress/index.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home2/vibrant/public_html/blog.php on line 3

    Is there any way to include it or will I have to install WordPress in my root directory?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Do you have anything else on that root index file? If not, i.e. you want your WP index file to be there… just search!
    (hint: look at the top here: DOCS >> Installation)

    Moderator James Huff

    (@macmanx)

    If you mean to integrate your blog into your site’s design, all you have to do is add the Loop to your design.

    http://codex.wordpress.org/The_Loop

    For more info, please do a search here for “integrate” or “the loop”.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Including WordPress with php.’ is closed to new replies.