WordPress.org

Support

Support » How-To and Troubleshooting » Include in WordPress

Include in WordPress

  • Hi im using WordPress 1.5 and it working great, except that I have a postlist registration form wich is another script that I want to include in the sidebar.php. The thing is that my WordPress is located in
    “root/main/”
    and the postlist script has alot of files and is located in
    “root/news/”

    There is a php file in “root/news/ ” thats called test.php wich has
    <?php include dirname(__FILE__) . “/include.php”; ?> and this displays the postlist registration from. I want to be able to display this registration form in my blog under sidebar.php.

    I sincerely hope that someone just understood a word of what I just wrote, because I sure could use the help since Im not to good in PHP.

Viewing 1 replies (of 1 total)
  • This should do:

    <?php include('/full/path/to/root/news/include.php'); ?>

    If you don’t know what your full path is and aren’t sure how to find out, create a file called “path.php” and place this in it:

    <?php echo dirname(__FILE__); ?>

    Upload that to your news/ directory and acccess it through your browser.

Viewing 1 replies (of 1 total)
  • The topic ‘Include in WordPress’ is closed to new replies.
Skip to toolbar