• Resolved WhitG

    (@whitg)


    I’m nearly finished with my first install and re-work of WordPress:
    https://angledend.com/update
    (content has been migrated from my old blog setup)

    On the right-hand side there you can see a failed PHP reference. That’s where I’m attempting to drop in regular HTML code from another file, in the same way I would use Apache SSI’s on a regular site (note: I know nothing about PHP). I assumed I could just use this:

    <?php get_emailaddress(); ?>

    …to reference the code found in ’emailaddress.php’, a file that just contains the relevant HTML, but that obviously isn’t working. I see lots of information in these forums on more complex include functions, but none that tell me how to just drop a simple block of content into your page. Can anyone tell me how to do this or point me in the right direction?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Well, that won’t work for sure.

    If that file is in the theme folder, you could use:
    <?php include(TEMPLATEPATH . "/yourfilename-here.php"); ?>
    Change only your file name!

    Thread Starter WhitG

    (@whitg)

    Bingo! Exactly what I needed, thanks a lot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rookie Q: Simple includes…’ is closed to new replies.