WordPress.org

Ready to get started?Download WordPress

Forums

including wordpress in an external php file (2 posts)

  1. orbstra
    Member
    Posted 5 years ago #

    About a year ago, I had a website all designed, and I wanted a section from my blog on the front page. So I simply include(./wp/index.php); and it worked fine (after hours of tweaking the template etc...). But now when I attempt this, nothing shows up after the line of include, it just stops anything after that line of code on the page, and it does not show anything from my blog

    help would be great, THANKS in advance!

  2. MichaelH
    Member
    Posted 5 years ago #

    You should be able to browse to yourdomain.com/wp to see the blog, correct?

    Might review Integrating_WordPress_with_Your_Website which recommends using this instead of the include:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('./wp/wp-blog-header.php');
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.