- This topic has 13 replies, 3 voices, and was last updated 4 years ago by Leo.
-
AuthorPosts
-
April 20, 2020 at 8:13 am #1246814Ricardo
Hi,
Could you please give me any hint on how to change the way categories and tags links are displayed?
I don’t know the exact terms, so I will give you a picture of what I would like to have:
https://www.poetryfoundation.org/poems/browse#page=1&sort_by=recently_added&filter_poetry_children=1
So basically I would like to remove commas and create a background color to each of the category and tag.
Thanks in advance,
RicardoApril 20, 2020 at 12:07 pm #1247070LeoStaffCustomer SupportHi there,
Try this snippet to remove the comma first:
add_filter( 'generate_term_separator', function() { return ''; } );
Adding PHP: https://docs.generatepress.com/article/adding-php/
Then link me to the page in question and I’ll provide some CSS.
Let me know 🙂
April 20, 2020 at 12:49 pm #1247118RicardoHi,
Thanks a lot, it’s very nice from your side to give this level of support.
This tags and categories appear in all search result, in all blog post and in all categories and tags page
Cateory page:
https://anexim.pt/category/proverbios-da-regiao-de-valpacos/Post:
https://anexim.pt/mulher-sem-vergonha-pior-que-peconha/King regards,
RicardoApril 20, 2020 at 3:11 pm #1247236LeoStaffCustomer SupportAre you using any custom functions or plugin to display the categories?
The
<ul class="post-categories">
isn’t the default structure.April 21, 2020 at 1:14 am #1247555RicardoHi,
I’m not sure what is the `<ul class=”post-categories”>, but I’ sure that the only thing that is affecting it is the snippet that you’ve indicated me to use:
add_filter( ‘generate_term_separator’, function() {
return ”;
} );I’ll disable it, so that you can see if it is about it.
Thanks,
RicardoApril 21, 2020 at 9:19 am #1248216TomLead DeveloperLead DeveloperHi there,
Any chance you can re-add it so I can take a look?
Let me know 🙂
April 21, 2020 at 9:51 am #1248241RicardoHi,
Sure. It’s done.
Thanks
April 21, 2020 at 10:19 am #1248274LeoStaffCustomer SupportLooks like we need a space in the return value.
Try this instead:
add_filter( 'generate_term_separator', function() { return ' '; } );
April 21, 2020 at 10:26 am #1248287RicardoNice!
Now it looks better.
April 21, 2020 at 10:28 am #1248293LeoStaffCustomer SupportNow we just have to do something like this:
.entry-meta a { padding: 3px 5px; background-color: #444444; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
April 21, 2020 at 10:47 am #1248311RicardoBeautiful 🙂
Is there anyway to make it different for categories and for tags. I mean, is it possible to distinguish between the two of them so that I can give different colors?
Thanks!
April 21, 2020 at 12:56 pm #1248440LeoStaffCustomer SupportTry this:
.entry-meta .cat-links a { padding: 3px 5px; background-color: #2a2; } .entry-meta .tags-links a { padding: 3px 5px; background-color: #000; }
April 21, 2020 at 1:21 pm #1248474RicardoThat is great Leo!
Thank you so much for your support on this topic.
If you and Tom need anything about guitar, Fado or music I’ll be glad to help you.
Best regards,
RicardoApril 21, 2020 at 1:31 pm #1248485LeoStaffCustomer SupportGlad we could help 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.