Include in WordPress (2 posts)

  1. F2
    Posted 11 years ago #

    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
    and the postlist script has alot of files and is located in

    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.

  2. Kafkaesqui

    Posted 11 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic