Archived topic
Want tags style to be like the example
7 replies · Started by Rohan Verma on July 26, 2022
Hello,
I want to change the look of tags on a single post. I want tags to look like this: https://themobilehunt.com/oxygenos/oneplus-nord-ce-2-lite-gets-june-2022-security-update/.
Here is the tag style: https://ibb.co/PzHTHq2
Hi there,
can you share a link to a post on your website where you want this style ?
Yes sure. I have added our site's post link in the private message. Please do check
Thanks and regards
Hi Rohan,
Try adding this CSS in Customize > Additional CSS:
span.tags-links a[rel="tag"] {
padding: 5px;
background-color: #fba056;
color: #fff;
border-radius: 4px;
}
Then, to remove the comma, add this PHP:
add_filter('generate_term_separator', function($separator, $tags){
return " ";
}, 10, 2);
Adding PHP reference: https://docs.generatepress.com/article/adding-php/#code-snippets
Hope this helps!
Awesome it worked. How can I remove the tag icon and replace it with the text "Tags"
You can try adding this CSS in Customize > Additional CSS:
span.tags-links .icon-tags {
display: none;
}
span.tags-links:before {
content: "Tags";
margin-right: 10px;
display:inline-block;
}
Thank you very much. Everything worked like a charm :)
You’re welcome Rohan! :)