After Every 2nd Post Add Content

This code enables you to add a widget area after every 2nd post on any type of archive. This way you can add advertisements or any other type pf content, after every 2 posts like you see in the following screenshot :

Note : You can also use the code to show content after every 3rd, 4th, 5th, 6th or any other number of posts on any type of archive page in Genesis.

Register or login to access the code :

Related Tutorials


Comments

4 responses to “After Every 2nd Post Add Content”

  1. KONAN YAMADA Avatar
    KONAN YAMADA

    Hello, I have a question.
    Regarding this article, I will try to add Adsense infeed banner code in space of “After Every 2nd Post”.
    However, this code is made by the sandwiched by .
    In this case, How should I modify in above code?

    the code is like this
    ——————-

    (adsbygoogle = window.adsbygoogle || []).push({});

    ——————-

    1. Brad Dalton Avatar
      Brad Dalton

      Paste the Adsense code into a custom HTML widget in the widget named : Widget After Every 2nd Post

      1. KONAN YAMADA Avatar
        KONAN YAMADA

        I understand.
        I didn’t notice that it is added new widget in widget page if I added code that you give me in function.php.
        Thank you so much!

  2. Hey Brad, I’m loving this!! I can think of so many things I could add in the extra areas.
    Thanks so much for the great work and helping to educate us all. 😉

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.