• Hello,

    I’ve developed a website using the Atahualpa theme. I’ve figured out how to add my banner ad to the header and the sidebar but I can’t find any information on how to add oone to the posts. (No one in the Bytes For All Forum knows how to do this. They sent me to wordpress.org.) The rotating ad is 200×250 and I’d like to put it about 1/3 of the way down the screen, aligned right on every post.

    Your help with this is very much appreciated.

    Chloe

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter chloe2

    (@chloe2)

    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

    Not sure maybe in the bfa_post_bodycopy function.
    I’ve added the http://wordpress.org/tags/atahualpa tag so someone might find this thread.

    When search on google for a solution someone noted they had success with this plugin and your theme.

    http://wordpress.org/extend/plugins/advertising-manager/

    Thread Starter chloe2

    (@chloe2)

    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.

    Check out the WP-Include plugin.

    David

    Last time I needed to do this, I found AdServe easy to use and quite light.

    Thread Starter chloe2

    (@chloe2)

    Thanks Esmi. I’ll try that.

    Thread Starter chloe2

    (@chloe2)

    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

    There is something called as RAW html plugin which will post your banner for you if you post the code in the html area.

    However, this is done manually.

    Try using wp-banner plugin as well.

    Ronak

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to add a banner-ad widget to all posts’ is closed to new replies.