This has me absolute stumped!
I have a small snippet of PHP code, <?php include('/includes/stuff.php'); ?>
. All it does is output an image.
If I put this in the WP themes header.php or index.php files, it will never show up. Here is the actual code in my the themes index.php file:
<img src="<?php bloginfo('stylesheet_directory');?>/images/content-top.gif" alt="content top" class="content-wrap" />
<?php include('/includes/stuff.php'); ?> TEST TEST TEST //this is the custom code
<div id="content">
But when it actually runs, it looks like:
<img src="http://www.bavarianblue.com/wp-content/themes/Polished/images/content-top.gif" alt="content top" class="content-wrap" />
<div id="content">
It just ignores my code entirely. No errors, no nothing.
The only time I could get it to work is if I included it in an already included file. For instance, in header.php there is an include for a features.php. If I included it there, it worked fine. But I don't want it there, I need it in index.php.
Is there some kind of configuration in wordpress where is needs to know all includes or something? I confirmed that my files are being modified (on the FTP).
EDIT
I just tried get_template_part(), as described on the wordpress codex, to no avail. Here is the snippet I tried:
<?php get_template_part( 'includes/stuff' ); ?>
Jared