Title: Post File
Last modified: August 19, 2016

---

# Post File

 *  Resolved [falconayr](https://wordpress.org/support/users/falconayr/)
 * (@falconayr)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/post-file/)
 * Hi there,
 * I would like to insert and advert at the end of every post (after the writing)
   and I am using a plugin to do it.
 * Could somebody let me know which file I am looking for (file that shows the posts)
   and if possible where to place the code that the plugin (AdRotator) requires 
   me to add.
 * the code is a simple php code:
 * `< ?<b>php</b> echo getad('bannerad') ?>`

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/post-file/#post-1397952)
 * 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
 *  Thread Starter [falconayr](https://wordpress.org/support/users/falconayr/)
 * (@falconayr)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/post-file/#post-1397976)
 * 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')): ?>
       ```
   
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/post-file/#post-1397988)
 * 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)
 *  Thread Starter [falconayr](https://wordpress.org/support/users/falconayr/)
 * (@falconayr)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/post-file/#post-1397992)
 * Hi there,
 * Bang on thank you. I found the content call in item.php and have got it working.
 * Thanks a million
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/post-file/#post-1397995)
 * Sure thing!
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/post-file/#post-1397996)
 * wow- who would have guessed `item.php`?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Post File’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [Samuel B](https://wordpress.org/support/users/samboll/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/post-file/#post-1397996)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
