Atahualpal 3.7.1 - Google Adsense nach erstem Post

  • Hallo, ich möchte gerne in mein Theme unter den ersten Post ein Feld für Google Adsense einblenden. Leider schaffe ich das nicht. Es steht immer über dem Post. Es soll aber zwischen dem ersten und zweiten stehen. Eingebunden wird es über die index.php des Themes. Ich stelle den code unten ran. Sieht jemand eine Lösung?


    Danke

    Tom

    --------------------

    <?php

    list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();

    get_header();

    extract($bfa_ata);

    ?>


    <?php /* If there are any posts: */

    if (have_posts()) : $bfa_ata['postcount'] = 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>

    <?php bfa_next_previous_page_links('Top'); // For MULTI post pages if activated at ATO -> Next/Previous Navigation: ?>

    <?php if( is_category() AND function_exists('page2cat_output')) { page2cat_output($cat); } // For the plugin Page2Cat http://wordpress.org/extend/plugins/page2cat/ ?>

    <?php while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>

    <?php if (!$show_adsense) { ?>
    <script type="text/javascript"><!--
    google_ad_client = "ca-pub-4514254335581640";
    /* 728x90, Erstellt 02.02.09 */
    google_ad_slot = "4641084758";
    google_ad_width = 728;
    google_ad_height = 90;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script><hr>
    <?php $show_adsense = 2; } ?>

    <?php bfa_next_previous_post_links('Top'); // For SINGLE post pages if activated at ATO -> Next/Previous Navigation ?>

    <?php /* Post Container starts here */

    if ( function_exists('post_class') ) { ?>

    <div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">

    <?php } else { ?>

    <div class="<?php echo ( is_page() ? 'page ' : '' ) . 'post" id="post-'; the_ID(); ?>">

    <?php } ?>

    <?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"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>

    <?php bfa_post_footer('<div class="post-footer">','</div>'); ?>

    </div><!-- / Post -->


    <?php endwhile; ?>


    <?php bfa_next_previous_post_links('Middle'); // Displayed on SINGLE post pages if activated at ATO -> Next/Previous Navigation: ?>

    <?php bfa_get_comments(); // Load Comments template (on single post pages, and static pages, if set on options page): ?>

    <?php bfa_next_previous_post_links('Bottom'); // Displayed on SINGLE post pages if activated at ATO -> Next/Previous Navigation: ?>

    <?php bfa_archives_page('<div class="archives-page">','</div>'); // Archives Pages. Displayed on a specific static page, if configured at ATO -> Archives Pages: ?>

    <?php bfa_next_previous_page_links('Bottom'); // Displayed on MULTI post pages if activated at ATO -> Next/Previous Navigation: ?>

    <?php /* END of: If there are any posts */

    else : /* If there are no posts: */ ?>

    <h2><?php _e('Not Found','atahualpa'); ?></h2>

    <p><?php _e("Sorry, leider nichts gefunden.","atahualpa"); ?></p>

    <?php endif; /* END of: If there are no posts */ ?>

    <?php get_footer(); ?>

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!