WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to add ads after the first 3 posts in twenty ten?

[Resolved] How to add ads after the first 3 posts in twenty ten?

  • 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Michael

    @alchymyth

    Forum Moderator

    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; ?>

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] How to add ads after the first 3 posts in twenty ten?’ is closed to new replies.