开发者

If there a snippet I'm missing in Tumblr to specify every-other?

开发者 https://www.devze.com 2023-02-02 15:05 出处:网络
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?

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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消