theme’s index.php shows posts on front page
theme’s single.php shows posts in the single post view
you want to add your code right after the_content() call in one or both of these files
Thank you.
My theeme single.php does not seem to have the_content() call.
It has:
<div id="wrapper">
<?php include(TEMPLATEPATH . "/menu.php"); ?>
<?php include(TEMPLATEPATH . "/banner.php"); ?>
<div class="content">
<?php if($options['bb_sidebar_layout'] == 'l' or $options['bb_sidebar_layout'] == 'll' or $options['bb_sidebar_layout'] == 'lr') { ?>
<?php include(TEMPLATEPATH . "/leftsidepanel.php"); ?>
<?php } ?>
<div class="container">
<ul class="posts">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<li>
<?php include (TEMPLATEPATH . "/item.php"); ?>
<?php if (function_exists('wp_list_comments')): ?>
<?php comments_template('', true); ?>
<?php endif; ?>
</li>
<?php endwhile; ?>
<?php endif; ?>
</ul>
</div>
<?php if($options['bb_sidebar_layout'] == 'r' or $options['bb_sidebar_layout'] == 'rr' or $options['bb_sidebar_layout'] == 'lr') { ?>
<?php include(TEMPLATEPATH . "/rightsidepanel.php"); ?>
<?php } ?>
<div class="clear"></div>
</div>
<?php get_footer(); ?>
</div>
I take my code would go in the middle of of this bit:
<ul class="posts">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<li>
<?php include (TEMPLATEPATH . "/item.php"); ?>
<?php if (function_exists('wp_list_comments')): ?>
<?php comments_template('', true); ?>
<?php endif; ?>
</li>
<?php endwhile; ?>
<?php endif; ?>
</ul>
Between these two bits of code:
<?php include (TEMPLATEPATH . "/item.php"); ?>
<?php if (function_exists('wp_list_comments')): ?>
sounds right….does item.php have the_content call? Since it item.php appears to be bringing in your posts (You may be able to ad your code to the bottom of item.php too, if that’s more appropriate)
Hi there,
Bang on thank you. I found the content call in item.php and have got it working.
Thanks a million
wow- who would have guessed item.php?