0

Like Lifehacker and several other sites, would like to know how to add # before tags displayed on the site. for e.g. instead of a tag like "abc", how about "#abc". - is there a way to automatically add # across all the tags present in the system?

3
  • Global changes are usually overly broad and can cause unwanted issues. It is better practice to determine specific parts of theme where this should be applied, relevant function and work from there.
    – Rarst
    Commented Jun 3, 2011 at 19:24
  • Yes. In single.php - this is precisely where I want to add this.
    – ash
    Commented Jun 13, 2011 at 14:34
  • possible duplicate of Add # before each tag Commented Jul 21, 2015 at 16:03

1 Answer 1

1

You could just do cosmetic changes on your theme with some javascript:

<script type="text/javascript">
jQuery(document).ready(function(){
    jQuery('.tags li a').prepend('#');
});
</script>

<ul class="tags">
    <li><a href="/tag/sometag/">sometag</a></li>
</ul>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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