Site logo

Archived topic

Want tags style to be like the example

7 replies · Started by Rohan Verma on July 26, 2022

Viewing posts 1–8 of 8

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! :)

This archived topic is closed to new replies.