WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to add ads after the first 3 posts in twenty ten? (3 posts)

  1. buddies
    Member
    Posted 1 year ago #

    Hi, I want to put different ads after the first 3 posts in twenty ten theme, but don't know how to go about doing it? Any help would be appreciated. I thank you in advance!

    My website is: http://buppha.co.uk

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    put different ads after the first 3 posts

    how do you want to control the 'different' part?

    generally, to add something after 3 posts in the loop of Twenty Ten, edit loop.php, find (a few lines from the end of the file):

    <?php endwhile; // End the loop. Whew. ?>

    before that line, add for example:

    <?php if( $wp_query->current_post == 2 ) : ?>
    YOUR HTML AD CODE
    <?php endif; ?>
  3. buddies
    Member
    Posted 1 year ago #

    Thanks for your help alchymyth. I have found an another way of doing it anyway. I will closed this topic now then.

Topic Closed

This topic has been closed to new replies.

About this Topic