Place advertisement between 2 full posts on home page

Viewing 3 posts - 1 through 3 (of 3 total)
  • #14310
    daisy
    Participant

    Hi,
    Is it possible to place an advertisement(or any sort of widget) between the 2 full posts on a homepage?

    My site is: http://fullthymestudent.com/

    If I cannot place an ad between the full post displays, how about placing an ad before the grid display? I am trying both options, but nothing I’ve done has worked.

    Please let me know if this is possible. Thank you for this fabulous theme! I’ve been working on this site for months, and this is such a helpful forum!

    #14374
    Daniel Tara
    Keymaster

    In index.php you would have to replace the loop with something like this:

    <?php $count = 0; ?>
    <?php while( have_posts() ) : the_post(); ?>
    	<?php $count++; ?>
    	<?php get_template_part( 'content', get_post_format() ); ?>
    	<?php if( 2 == $count ) : ?>
    		// Ad code here
    	<?php endif; ?>
    <?php endwhile; ?>
    #15312
    daisy
    Participant

    So right now I have :

    			<?php if( have_posts() ) : ?>
    				<div class="entries">
    					<?php while( have_posts() ) : the_post(); ?>
    <?php get_template_part( 'content', get_post_format() ); ?>
    					<?php endwhile; ?>
    				</div><!-- .entries -->
    				<?php pinboard_posts_nav(); ?>
    			<?php else : ?>
    

    I’ve never gotten any of this to work, the ad ends up covering the feature photo of the very first post. If you have a workaround or if anybody can help me, please let me know.
    Thanks so much

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.