How to remove '#' from K2 tags

  • Comments:View comments
Rate this item
(0 votes)

Recent K2 release has a new CSS rules to add "#" before tags, even if the tag consists of multiple words, since some K2 community members don't like this format and asked how to turn if off.

Here is how to do it without the need to do it with every K2 update...

There are 2 options you can follow according to your preferences

1- You need to copy thecomponents/com_k2/css/k2.css file to your template's css folder and remove these rules from the copied file:

div.itemTagsBlock ul.itemTags li a:before {content:"#";}

div.catItemTagsBlock ul.catItemTags li a:before {content:"#";}

div.userItemTagsBlock ul.userItemTags li a:before {content:"#";}

div.latestItemTagsBlock ul.latestItemTags li a:before {content:"#";}

 

2- Another method is available if your template supports a custom.css file, you will add these rules to it:

div.itemTagsBlock ul.itemTags li a:before {content:none !important;}

div.catItemTagsBlock ul.catItemTags li a:before {content:none !important;}

div.userItemTagsBlock ul.userItemTags li a:before {content:none !important;}

div.latestItemTagsBlock ul.latestItemTags li a:before {content:none !important;}

 

If you have any questions or suggestions, feel free to comment on this post, or contact me directly via email or social media (on the above right corner of this page).

Read 1415 times