Поддержка Проблемы и решения Добавление рекламы в Архивы WordPress

  • Привет всем. Нужна помощь в добавлении рекламы на сайт в Архивы и на Главную. Отрывок кода такой:

    <?php if ( have_posts() ) : ?>
    				<header class="page-header pad-container" <?php cryout_schema_microdata( 'element' ); ?>>
    					<?php
    						// Load custom header if author
    						if (is_author()) {
    							get_template_part( 'content/author-bio' );
    						// Default for all archives
    						} else {
    							the_archive_title( '<h1 class="page-title" ' . cryout_schema_microdata('entry-title', 0) . '>', '</h1>' );
    							the_archive_description( '<div class="taxonomy-description">', '</div>' );
    						}
    					?>
    				</header><!-- .page-header -->
    
    				<div id="content-masonry" <?php cryout_schema_microdata( 'blog' ); ?>>
    					<?php
    				 while ( have_posts() ) : the_post(); 
    					/*
    					 * Include the Post-Format-specific template for the content.
    					 * If you want to override this in a child theme, then include a file
    					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    					 */
    					get_template_part( 'content/content', get_post_format() );
    					endwhile;
    					?>

    Помогите подправить код. Я читала про счетчик $postcounter++; и потом вставить
    <?php if ($postcounter == 1) { include (TEMPLATEPATH . ‘/reklama.php’); } ?>

    Пробовала вставлять, но в данном коде не получилось правильно сделать. Очень прошу помочь))) Спасибо!

  • Тема «Добавление рекламы в Архивы WordPress» закрыта для новых ответов.