Add content every 3 posts on Tumblr

I would like to know if there is a way to post content after the 3rd post on each page so that I can do something ... I find nothing in the tumblr theme API

+3
source share
1 answer

API specific post

If you use the API to collect / add messages, this will remain for you. A simple cycle / count should be sufficient to determine the third message.

Specific mail with topics

If you create a Tumblr theme, there is a theme operator / block to satisfy this:

{block:Post[1-15]} 
  /* Add something to the post [1-15] on each page */
{/block:Post[1-15]} 

Displayed for a message with the specified offset. This allows you to insert an advertising or design element in the middle of your messages.

OP 3- , {block:Posts}{/block:Posts}.

{block:Posts}
  /* All your layout / post logic here, making sure 
     there is nothing left to render */
  {block:Post3}
    /* Add something directly after the third post on each page */
  {/block:Post3}
{/block:Posts}

-: http://www.tumblr.com/docs/en/custom_themes#posts

+4

All Articles