• Resolved wordman1994

    (@wordman1994)


    Hello,

    I wish to amend the footer with some information from an include file that I use throughout my website. Not having much luck at the moment.

    I added my include file into the wp-includes folder, then added this bit of code to footer.php:

    <?php include(‘/blog1/wp-includes/footer_bar.php’); ?>

    Apparently the path is not correct because I get errors. The error says I need this information:

    include_path=’.:/usr/services/vux/lib/php’

    So, how do I set the correct path to include my, um, include file?

    PLEASE NOTE: I am KEEPING the WordPress info in the footer!!! Just adding my own site info along side it.

    Any help will be, GREATLY appreciated.

    Sincerely,

    Wordman

Viewing 3 replies - 1 through 3 (of 3 total)
  • Put the include files in your theme folder and use this in your theme’s footer.php:

    <?php include (TEMPLATEPATH . '/footer_bar.php'); ?>

    Thread Starter wordman1994

    (@wordman1994)

    iridax,

    THANK YOU!!!

    Sincerely,

    Wordman

    Sorry, daft question but I’m looking into this myself. I want to use a server side include myself, but don’t see much point if the file to include has to sit within the WordPress installation directories (thereby creating a second copy of the include file that I then have to remember to keep up to date – hope that makes sense).

    The whole point is I already have files I use as includes on my main site and would like to incorporate these within the blog. So, what would be the correct syntax to point to, say, the root folder – would it be this:

    <?php include(‘../includefile.php’); ?>

    Based on the assumption that WordPress sits within it’s own directory.

    Or was the answer above saying I would need to put my includes within my WordPress directory and change all the references from other parts of the site point to there?

    Andy

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding my own include file links…how do I do it?’ is closed to new replies.