WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Add div tag after 3rd, 6th & 9th post (2 posts)

  1. Jönson
    Member
    Posted 1 year ago #

    Hi, is there anyone out there who can hear me?

    I need some coding help to add a div tag after 3rd, 6th and 9th post.
    Each div-tag is different.
    Anyone?

  2. Jönson
    Member
    Posted 1 year ago #

    <?php $postnum++;
    if ($postnum == 3) { ?>

    <h2>Blog</h2>

    <?php }
    if ($postnum == 6) { ?>

    <h2>References</h2>

    <?php }
    if ($postnum == 9) { ?>

    <h2>Meet the team</h2>

    <?php }; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic