Support » Fixing WordPress » Count overall posts Ad Placement

  • I have seen alot of scripts and posts about placing an ad based on counting the number of posts that are printed via the loop.. (ex: every 2 posts.. etc)

    What I would like to do is have an overall count, not just page specific… For example, since my blog only shows 10 posts per page, and I wanted to display an ad every 15 posts.. Is this possible? Is there a way to count from the beginning of the first page back?

Viewing 1 replies (of 1 total)
  • After thinking about this..

    I think the best way would be to simply count all the posts.. with wp_count_posts

    Then saying something like … every 15.. print this..

Viewing 1 replies (of 1 total)
  • The topic ‘Count overall posts Ad Placement’ is closed to new replies.