I'm hoping there are some Tumblr pro's out th开发者_如何学Cere today.
Just wondering if there is a Tumblr template snippet that executes on every other post?
Basically something like this:
{block:Pages}
<ul>
<li><a href="" {switch}class="odd"{/switch}></a>
</ul>
{/block:Pages}
Just trying to add that extra class on odd posts.
Thanks!
You've got 2 options:
The first would be to trigger every odd/even post entry by using {block:Odd} {/block:Odd}
Alternatively, you could use {Alt}
in conversation posts.
As for something that works like {Alt} in every single post, I'm not aware of any and you'll have to use the Tumblr API along with JSON to manipulate it.
Hope it helps :)
精彩评论