Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this, it worked for me when I put it into the Theme Parser. I've modified your code a little bit:</p> <ul> <li>overhauled your syntax to be intended. Please don't take offense, I only did it for clarity's sake! </li> <li>move the <code>&lt;ol&gt;</code> element outside of the <code>{block:Posts}</code> as everything inside it is rendered once for each type of post.</li> <li>moved and modified your <code>&lt;li&gt;</code> element so that's no longer specific to the type of post, Tumblr provide a neat little <code>{PostType}</code> variable that will print each post's type (except for photoset; for which it prints "photo", but I've added a little bit more in there to account for that.) This is faster to render and simpler to read.</li> <li>swapped your <code>{AudioPlayerWhite}</code> to <code>{AudioPlayer}</code>, this is just because Tumblr sometimes gets upset if you define the audio player's colour, and a message is displayed on tumblr.com/new/audio saying "Your theme does not support proper audio players". Probably not connected to the problem but it's a good practice</li> </ul> <p>Working example: <a href="http://stackoverflow-theme-test-1.tumblr.com/" rel="nofollow">stackoverflow-theme-test-1.tumblr.com</a> - ignore how it looks because I didn't apply any styling, but the code is all perfectly valid.</p> <pre><code>&lt;ol class="posts"&gt; {block:Posts} &lt;li class="post type_{PostType}{block:Photoset}set{/block:Photoset}" id="{PostID}"&gt; &lt;!--Saves you from having to manually define each type of post--&gt; {block:Text} {block:Title} &lt;h2&gt;&lt;a href="{Permalink}" title="Go to post '{Title}'."&gt;{Title}&lt;/a&gt;&lt;/h2&gt; {/block:Title} {Body} {/block:Text} {block:Photo} &lt;div class="image"&gt; &lt;a href="{LinkURL}"&gt;&lt;img src="{PhotoURL-500}" alt="{PhotoAlt}"&gt;&lt;/a&gt; &lt;/div&gt; {block:Caption} {Caption} {/block:Caption} {/block:Photo} {block:Photoset} {Photoset-500} {block:Caption} {Caption} {/block:Caption} {/block:Photoset} {block:Quote} &lt;blockquote&gt; &lt;div class="quote_symbol"&gt;&amp;ldquo;&lt;/div&gt; {Quote} &lt;/blockquote&gt; {block:Source} &lt;div class="quote_source"&gt;{Source}&lt;/div&gt; {/block:Source} {/block:Quote} {block:Link} &lt;h2&gt;&lt;a href="{URL}" {Target} title="Go to {Name}."&gt;{Name}&lt;/a&gt;&lt;/h2&gt; {block:Description} {Description} {/block:Description} {/block:Link} {block:Chat} {block:Title} &lt;h2&gt;&lt;a href="{Permalink}" title="Go to post {PostID} '{Title}'."&gt;{Title}&lt;/a&gt;&lt;/h2&gt; {/block:Title} &lt;table class="chat_log"&gt; {block:Lines} &lt;tr class="{Alt} user_{UserNumber}"&gt; &lt;td class="person"&gt;{block:Label}{Label}{/block:Label}&lt;/td&gt; &lt;td class="message"&gt;{Line}&lt;/td&gt; &lt;/tr&gt; {/block:Lines} &lt;/table&gt; {/block:Chat} {block:Video} {Video-500} {block:Caption} {Caption} {/block:Caption} {/block:Video} {block:Audio} {AudioPlayer} &lt;!--Tumblr don't like you to specify a colour for the {AudioPlayer}, you could do anyway, but in the interests of minimising parsing errors I havent--&gt; {block:Caption} {Caption} {/block:Caption} {block:ExternalAudio} &lt;p&gt;&lt;a href="{ExternalAudioURL}" title="Download '{ExternalAudioURL}'"&gt;Download&lt;/a&gt;&lt;/p&gt; {/block:ExternalAudio} {/block:Audio} &lt;div class="post_footer"&gt; &lt;p class="post_date"&gt;Posted on {ShortMonth} {DayOfMonth}, {Year} at {12hour}:{Minutes} {AmPm}&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a class="comment_link" href="{Permalink}#disqus_thread"&gt;Comments&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=722e181d-1d8a-4363-9ebe-82d5263aea94&amp;amp;type=website"&gt;&lt;/script&gt;&lt;/li&gt; &lt;/ul&gt; {block:PermalinkPage} &lt;div id="disqus_thread"&gt;&lt;/div&gt; &lt;script type="text/javascript" src="http://disqus.com/forums/kyleetilley/embed.js"&gt;&lt;/script&gt; &lt;noscript&gt;&lt;a href="http://disqus.com/forums/kyleetilley/?url=ref"&gt;View the discussion thread.&lt;/a&gt;&lt;/noscript&gt; {/block:PermalinkPage} &lt;/div&gt; &lt;/li&gt; {/block:Posts} &lt;/ol&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload