Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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

    Thread Starter chloe2

    (@chloe2)

    Thanks Esmi. I’ll try that.

    Thread Starter chloe2

    (@chloe2)

    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

    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.

    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

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