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 edited a Tumblr layout to show tags on each post but for some reason the tags are showing up below the post boxes, and right above the next post.

The code I have for the layout is as below (truncated):

{block:Posts}
    {block:Text}
       <li class="post text">
           <!-- HTML layout for Text posts -->
       </li>
    {/block:Text}

    {block:Photo}
       <li class="post photo">
           <!-- HTML layout for Photos -->
       </li>
    {/block:Photo}

    {block:Quote}
       <li class="post quote">
           <!-- HTML layout for quotes -->
       </li>
    {/block:Quote}

    {block:Link}
       <li class="post link">
           <!-- HTML layout for link posts -->
       </li>
    {/block:Link}

    <!-- etc. -->

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

I can't seem to figure out how/where to edit the theme so the tags show up within the post container and not floating outside and into the next post.

share|improve this question

2 Answers 2

this worked with me but i'm not sure if it will work the same for you, paste:

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

{/block:Posts}

just after the opening of the notecount tag, so after {block:PostNotes} so it it looks a little something like:

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

{/block:Posts}<center>{block:RebloggedFrom}reblogged from <a href="{ReblogParentURL}">{ReblogParentName}</a><br>{/block:RebloggedFrom}
{block:ContentSource}posted by <a href="{SourceURL}">{SourceLink}</a></br>{/block:ContentSource}</center>
{PostNotes}
{/block:PostNotes}

this should ensure that tags are shown within the post box

share|improve this answer

It may be tedious, but it looks like you'll have to include the HasTags block in each of the section types.

Starting with the first you'll end up with this:

    {block:Text}
       <li class="post text">
           <!-- HTML layout for Text posts -->

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

       </li>
    {/block:Text}

Where you currently have it appear just before {/block:Posts}, change it to be just before the closing </li> which appears to be what your post container styles are dressed in.

Don't forget to remove the block that appears just before the closing {/block:Posts} or you'll get the tags showing up twice.

share|improve this answer
    
That makes sense to me, however, it's still not working. I wonder if there's something else in the coding that's overriding it? Here's my edited version: pastebin.com/DsEdvxSY –  JammerLea Aug 15 '11 at 5:03
    
Btw, just to add, I was helping a friend with the same problem on one of her tumblr layouts and that method DID work, but I had to place it within some div coding. Just to share what that looked like, I'm too tired to analyze the div coding atm. pastebin.com/8sdatk0V –  JammerLea Aug 15 '11 at 5:17
    
Looks like in your template you'll have to put the code just before the tag that finishes the style block. @jam –  Eight Days of Malaise Aug 15 '11 at 11:51
    
...why didn't I think of that? Yes! That worked! Thank you so much for your help and time. I really appreciate it! –  JammerLea Aug 15 '11 at 13:14

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.