Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I've made several attempts to add tags to my tumblr posts, but each time I try to edit the theme I end up with a list of tags across the top of my blog instead of included in each seperate post. Can anyone tell me how to edit the theme below to add tags to my posts?

<!-- {block:Posts} -->

        <!-- DATES -->

        <!-- {block:NewDayDate} -->
        <div class="entry date">
            <div class="icon">
                <a class="permalink" href="/archive/{Year}/{MonthNumber}"></a>
            </div><!-- /.icon -->
            <div class="content">
                <div class="caption">
                    <p><a href="/archive/{Year}/{MonthNumber}">{Month} {DayOfMonth} {Year}</a></p>
                </div><!-- /.caption -->
            </div><!-- /.content -->
        </div><!-- /.entry .date -->
        <!-- {/block:NewDayDate} -->

        <!-- PHOTO -->
        <!-- {block:Photo} -->
        <div class="post photo" id="p_{PostID}">
            <div class="icon">
                <a class="permalink" href="{Permalink}"></a>
                {block:HighRes}<a href="{PhotoURL-HighRes}" rel="lightbox" class="zoom"></a>{/block:HighRes}
                {block:IndexPage}
                {block:NoteCount}<a href="{Permalink}" class="notes">*{NoteCount}<br></a>{/block:NoteCount}
                {/block:IndexPage}
            </div>
            <div class="content">
                <div class="the_photo">
                    <div class="photo_inner photo_loading">
                    {LinkOpenTag}<img src="{PhotoURL-500}" class="faint" alt="{PhotoAlt}"/>{LinkCloseTag}
                    </div>
                </div><!-- .the_photo -->
                <!--{block:Caption}-->
                <div class="caption">
                    <p>{Caption}</p>
                    {block:Date}{block:IfDisqusShortname}<p><a href="{Permalink}#disqus_thread"></a></p>{block:IfDisqusShortname}{/block:Date}
                </div><!-- /.caption -->
                <!--{/block:Caption}-->
            </div><!-- /.content -->
        </div><!-- /.post .photo -->        
        <!-- VIDEO -->

        <!-- {block:Video} -->
        <div class="post video" id="p_{PostID}">
            <div class="icon">
                <a class="permalink" href="{Permalink}"></a>
                {block:IndexPage}
                {block:NoteCount}<a href="{Permalink}" class="notes">*{NoteCount}<br></a>{/block:NoteCount}
                {/block:IndexPage}
            </div><!-- /.icon -->
            <div class="content">
                <div class="player">{Video-500}</div>
                <!--{block:Caption}-->
                <div class="caption">
                    <p>{Caption}</p>
                    {block:Date}{block:IfDisqusShortname}<p><a href="{Permalink}#disqus_thread"></a></p>{block:IfDisqusShortname}{/block:Date}
                </div><!-- /.caption -->
                <!--{/block:Caption}-->
            </div><!-- /.content -->
        </div><!-- /.post .video -->
        <!-- {/block:Video} -->

        <!-- LINK -->

        <!-- {block:Link} -->
        <div class="post link" id="p_{PostID}">
            <div class="icon">
                <a class="permalink" href="{Permalink}"></a>
                {block:IndexPage}
                {block:NoteCount}<a href="{Permalink}" class="notes">*{NoteCount}<br></a>{/block:NoteCount}
                {/block:IndexPage}
            </div><!-- /.icon -->
            <div class="content">
                <div class="caption">
                    <h3><a href="{URL}" {Target}>{Name}</a></h3>
                    <p><span class="description">{Description}</span></p>
                    {block:Date}{block:IfDisqusShortname}<p><a href="{Permalink}#disqus_thread"></a></p>{block:IfDisqusShortname}{/block:Date}
                </div><!-- /.caption -->
            </div><!-- /.content -->
        </div><!-- /.post .link -->
        <!-- {/block:Link} -->

        <!-- REGULAR -->

        <!-- {block:Regular} -->
        <div class="post regular" id="p_{PostID}">
            <div class="icon">
                <a class="permalink" href="{Permalink}"></a>
                {block:IndexPage}
                {block:NoteCount}<a href="{Permalink}" class="notes">*{NoteCount}<br></a>{/block:NoteCount}
                {/block:IndexPage}
            </div><!-- /.icon -->
            <div class="content">
                <div class="caption">
                    <h3><a href="{Permalink}">{Title}</a></h3>
                    <p>{Body}</p>
                    {block:Date}{block:IfDisqusShortname}<p><a href="{Permalink}#disqus_thread"></a></p>{block:IfDisqusShortname}{/block:Date}
                </div><!-- /.caption -->
            </div><!-- /.content -->
        </div><!-- /.post .regular -->
        <!-- {/block:Regular} -->

        <!-- QUOTE -->

        <!-- {block:Quote} -->
        <div class="post quote" id="p_{PostID}">
            <div class="icon">
                <a class="permalink" href="{Permalink}"></a>
                {block:IndexPage}
                {block:NoteCount}<a href="{Permalink}" class="notes">*{NoteCount}<br></a>{/block:NoteCount}
                {/block:IndexPage}
            </div><!-- /.icon -->
            <div class="content">
                <div class="caption">
                    <p class="the_quote {Length}"><span class="quote_mark">"</span>{Quote}<span class="quote_mark">"</span></p>
                    <!-- {block:Source} -->
                    <p class="source">{Source}</p>
                    <!-- {/block:Source} -->
                    {block:Date}{block:IfDisqusShortname}<p><a href="{Permalink}#disqus_thread"></a></p>{block:IfDisqusShortname}{/block:Date}
                </div><!-- /.caption -->
            </div><!-- /.content -->
        </div><!-- /.post .quote -->            
        <!-- {/block:Quote} -->

        <!-- AUDIO -->

        <!-- {block:Audio} -->
        <div class="post audio" id="p_{PostID}">
            <div class="icon">
                <a class="permalink" href="{Permalink}"></a>
                {block:ExternalAudio}<a href="{ExternalAudioURL}" class="download"></a>{/block:ExternalAudio}
                {block:IndexPage}
                {block:NoteCount}<a href="{Permalink}" class="notes">*{NoteCount}<br></a>{/block:NoteCount}
                {/block:IndexPage}
            </div><!-- /.icon -->
            <div class="content">
                <div class="the_player">{AudioPlayerGrey}</div>
                <div class="caption">
                    <p>{Caption}</p>
                    {block:Date}{block:IfDisqusShortname}<p><a href="{Permalink}#disqus_thread"></a></p>{block:IfDisqusShortname}{/block:Date}
                </div><!-- /.caption -->
            </div><!-- /.content -->
        </div><!-- /.post .quote -->
        <!-- {/block:Audio} -->

        <!-- CONVERSATION -->

        <!-- {block:Conversation} -->
        <div class="post conversation" id="p_{PostID}">
            <div class="icon">
                <a class="permalink" href="{Permalink}"></a>
                {block:IndexPage}
                {block:NoteCount}<a href="{Permalink}" class="notes">*{NoteCount}<br></a>{/block:NoteCount}
                {/block:IndexPage}
            </div><!-- /.icon -->
            <div class="content">
                <div class="caption">
                    <!-- {block:Title} -->
                    <h3><a href="{Permalink}">{Title}</a></h3>
                    <!-- {/block:Title} -->
                    <p>
                        <ul>
                            <!-- {block:Lines} -->
                                <li>
                                    {block:Label}<span class="label {Alt}">{Label}</span>{/block:Label}
                                    {Line}
                                </li>
                                <!-- {/block:Lines} -->
                        </ul>
                    </p>
                    {block:Date}{block:IfDisqusShortname}<p><a href="{Permalink}#disqus_thread"></a></p>{block:IfDisqusShortname}{/block:Date}
                </div><!-- /.caption -->
            </div><!-- /.content -->
        </div><!-- /.post .conversation -->
        <!-- {/block:Conversation} --> 


        <!--{block:PermalinkPage}-->
        <!--{block:Date}-->
        <!--{block:PostNotes}-->
        <div class="entry post_notes">
            <div class="icon">
                <a class="permalink" href="{Permalink}"></a>
            </div><!-- /.icon -->
            <div class="content">
                <div class="caption">
                    <div class="the_notes">
                    {PostNotes}
                    </div>
                </div><!-- /.caption -->
            </div><!-- /.content -->
        </div><!-- /.entry .notes -->
        <!--{/block:PostNotes}-->

        <!--{block:IfDisqusShortname}-->
        <div class="entry">
            <div class="content">
                <div class="caption">
                    <div id="disqus_thread"></div>
                    <script type="text/javascript" src="http://disqus.com/forums/{text:Disqus Shortname}/embed.js"></script>
                    <noscript><a href="http://{text:Disqus Shortname}.disqus.com/?url=ref">{lang:View the discussion thread}</a></noscript>
                </div>
            </div>
        </div>
        <!--{/block:IfDisqusShortname}-->
        <!--{/block:Date}-->
        <!--{/block:PermalinkPage}-->           


        <!-- {/block:Posts} --> 
share|improve this question
    
Why are all of your {block:}s commented out? –  Abby T. Miller Sep 29 '11 at 15:43
add comment

1 Answer 1

Include the following code:

{block:HasTags}
   {block:Tags}
       <a class="tag" href="{TagURL}">{Tag}</a>
   {/block:Tags}
{/block:HasTags}

in the block for each type of post. So you will have this seven times: in {block:Text}, in {block:Audio}, etc.

Put this right before the closing of the block (so right before {/block:Text}, for example) to have the tags show up at the end of the post.

Tumblr provides some documentation on this here.

share|improve this answer
    
There's a lot of good information on playing with tumblr tags in this question. –  Abby T. Miller Sep 29 '11 at 15:49
    
This question, also useful. –  Abby T. Miller Sep 29 '11 at 16:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.