Title: chloe2's Replies | WordPress.org

---

# chloe2

  [  ](https://wordpress.org/support/users/chloe2/)

 *   [Profile](https://wordpress.org/support/users/chloe2/)
 *   [Topics Started](https://wordpress.org/support/users/chloe2/topics/)
 *   [Replies Created](https://wordpress.org/support/users/chloe2/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/chloe2/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/chloe2/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/chloe2/engagements/)
 *   [Favorites](https://wordpress.org/support/users/chloe2/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [How to add a banner-ad widget to all posts](https://wordpress.org/support/topic/how-to-ad-a-banner-add-widget-to-all-posts/)
 *  Thread Starter [chloe2](https://wordpress.org/support/users/chloe2/)
 * (@chloe2)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/how-to-ad-a-banner-add-widget-to-all-posts/#post-1362071)
 * Hi David,
    I checked out WP-include (after getting no where with advertising 
   manager and AdServe). WP-include looks promising but I need my ad to be automatically
   embedded in each post on my website.
 * WP-include provides the following code to be added in functions.php but this 
   just allows me to manually insert the ad in each page or post.
 * **********************************************************
    function include_file(
   $atts) { //check the input and override the default filepath NULL //if filepath
   was specified extract(shortcode_atts(array(‘filepath’ => ‘NULL’), $atts)); //
   check if the filepath was specified and if the file exists if ($filepath!=’NULL’&&
   file_exists(TEMPLATEPATH.$filepath)){ //turno on output buffering to capture 
   script output ob_start(); //include the specified file include(TEMPLATEPATH.$
   filepath); //assign the file output to $content variable and clean buffer $content
   = ob_get_clean(); //return the $content //return is important for the output 
   to appear at the correct position //in the content return $content; } } //register
   the Shortcode handler add_shortcode(‘include’, ‘include_file’);
 * *******************************************************
 * I need to find a way to automatically embed the ad in every post. Any ideas or
   suggestions are very welcomed.
 * Thanks
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [How to add a banner-ad widget to all posts](https://wordpress.org/support/topic/how-to-ad-a-banner-add-widget-to-all-posts/)
 *  Thread Starter [chloe2](https://wordpress.org/support/users/chloe2/)
 * (@chloe2)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/how-to-ad-a-banner-add-widget-to-all-posts/#post-1361962)
 * Thanks Esmi. I’ll try that.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Advertising Manager] Installed plug-in gives syntax error](https://wordpress.org/support/topic/plugin-advertising-manager-insstalled-plug-in-gives-syntax-error/)
 *  Thread Starter [chloe2](https://wordpress.org/support/users/chloe2/)
 * (@chloe2)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-advertising-manager-insstalled-plug-in-gives-syntax-error/#post-1361958)
 * Hi Scott,
 * That’s JavaScript calling the program which is PHP(simple-banner-rotator). The
   code works fine in the header but I put it in a widget there. Perhaps Advertising
   Manager won’t work with the simple-banner code. I’d rather use a widget as I 
   did for the header but I can’t get any information about where to add it in the
   post loop.
    This is the Atahualpa post loop:
 * ***********************************
    <?php /* For SINGLE post pages if activated
   at ATO -> Next/Previous Navigation: */ bfa_next_previous_post_links(‘Top’); ?
   >
 * <?php /* Post Container starts here */
 * if ( function_exists(‘post_class’) ) { ?>
    <div <?php if ( is_page() ) { post_class(‘
   post’); } else { post_class(“$odd_or_even”); } ?> id=”post-<?php the_ID(); ?>”
   >
 * <?php } else { ?>
    <div class=”<?php echo ( is_page() ? ‘page ‘ : ” ) . $odd_or_even.‘
   post” id=”post-‘; the_ID(); ?>”>
 * <?php bfa_post_kicker(‘<div class=”post-kicker”>’,'</div>’); ?>
 * <?php bfa_post_headline(‘<div class=”post-headline”>’,'</div>’); ?>
 * <?php bfa_post_byline(‘<div class=”post-byline”>’,'</div>’); ?>
 * <?php bfa_post_bodycopy(‘<div class=”post-bodycopy clearfix”>’,'</div>’); ?>
 * <?php bfa_post_pagination(‘<p class=”post-pagination”>**‘.__(‘Pages:’,’atahualpa’).’**‘,'
   </p>’); ?>
 * <?php bfa_post_footer(‘<div class=”post-footer”>’,'</div>’); ?>
 * </div><!– / Post –>
 * ****************************************************
    Someone on a different 
   forum on this site recommended Advertising Manager rather than messing with the
   loop code.
 * Chloe
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [How to add a banner-ad widget to all posts](https://wordpress.org/support/topic/how-to-ad-a-banner-add-widget-to-all-posts/)
 *  Thread Starter [chloe2](https://wordpress.org/support/users/chloe2/)
 * (@chloe2)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/how-to-ad-a-banner-add-widget-to-all-posts/#post-1361793)
 * Thanks for your help Michael. I tried the advertising manager plug-in and it 
   keeps giving me a symtax error. I’m looking into it further.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [How to add a banner-ad widget to all posts](https://wordpress.org/support/topic/how-to-ad-a-banner-add-widget-to-all-posts/)
 *  Thread Starter [chloe2](https://wordpress.org/support/users/chloe2/)
 * (@chloe2)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/how-to-ad-a-banner-add-widget-to-all-posts/#post-1361781)
 * Thanks. Yes I did look at that posting earlier. This is the Loop code in the 
   Atahualpa theme:
 * **************************************************
    <?php /* For SINGLE post 
   pages if activated at ATO -> Next/Previous Navigation: */ bfa_next_previous_post_links(‘
   Top’); ?>
 * <?php /* Post Container starts here */
 * if ( function_exists(‘post_class’) ) { ?>
    <div <?php if ( is_page() ) { post_class(‘
   post’); } else { post_class(“$odd_or_even”); } ?> id=”post-<?php the_ID(); ?>”
   >
 * <?php } else { ?>
    <div class=”<?php echo ( is_page() ? ‘page ‘ : ” ) . $odd_or_even.‘
   post” id=”post-‘; the_ID(); ?>”>
 * <?php bfa_post_kicker(‘<div class=”post-kicker”>’,'</div>’); ?>
 * <?php bfa_post_headline(‘<div class=”post-headline”>’,'</div>’); ?>
 * <?php bfa_post_byline(‘<div class=”post-byline”>’,'</div>’); ?>
 * <?php bfa_post_bodycopy(‘<div class=”post-bodycopy clearfix”>’,'</div>’); ?>
 * <?php bfa_post_pagination(‘<p class=”post-pagination”>**‘.__(‘Pages:’,’atahualpa’).’**‘,'
   </p>’); ?>
 * <?php bfa_post_footer(‘<div class=”post-footer”>’,'</div>’); ?>
 * </div><!– / Post –>
 * *********************************************************
    This is the code I
   want to add:
 * <?php bfa_widget_area(‘name=post_ad area&cells=1&align_1=4&after_widget=</div
   >’); ?>
 * But I don’t know where to add it so the ad views 1/3 down the screen in the post.
 * Thanks for your help,
    Chloe

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