Custom PHP code won't show up in Wordpress theme?

attetraverevsz

New Member
This has me absolute stumped!I have a small snippet of PHP code, \[code\]<?php include('/includes/stuff.php'); ?>\[/code\]. 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:\[code\]<img src="http://stackoverflow.com/questions/3846384/<?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">\[/code\]But when it actually runs, it looks like:\[code\]<img src="http://www.bavarianblue.com/wp-content/themes/Polished/images/content-top.gif" alt="content top" class="content-wrap" /> <div id="content"> \[/code\]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).EDITI just tried get_template_part(), as described on the wordpress codex, to no avail. Here is the snippet I tried:\[code\]<?php get_template_part( 'includes/stuff' ); ?>\[/code\]Jared
 
Back
Top