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

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. 😉

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.