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'm using the "Feather" theme on tumblr, which I had to customize in order for it to display tags. The tags are showing up fine on my dashboard, but if I actually visit my blog URL, there is no hash (#) in front of them. This small change is annoying me terribly. Is there anyway to tell the tag system I want it to automatically put a hash there to separate them? Thanks! My HTML for the tags is as follows:

    {block:HasTags} 
    {block:Tags} 
    <a href=”{TagURL}”>{Tag}</a> 
    {/block:Tags} 
    {/block:HasTags}
share|improve this question
add comment

1 Answer

Variant 1: in HTML

If you want to include the # before each tag so that it could be copy&pasted, you could add it in your markup:

<a href=”{TagURL}”>#{Tag}</a> 

Variant 2: in CSS

If you only want to display the #, you could use pseudo-elements (CSS):

a::before (content:"#";)

You'd need to use an appropriate selector so that it only adds the pseudo-element to the tag links; if there is no such class or ID, you could add a class to your markup, of course, e.g.:

<a href=”{TagURL}” class="tag">#{Tag}</a> 

so then you could add to your CSS:

.tag::before (content:"#";) 

Variant 3: tags itself

If you want your actual tags to start with a #, you'd need to re-tag your content. But I'd assume that Tumblr forbids the # character in tag names (but there doesn't seem to be any documentation which characters are allowed), so this wouldn't work.


I don't know/understand your exact use case, but I assume that you only need it as visual separator, so you should go with variant 2.

share|improve this answer
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.