Archived topic
Change category and tag metadata location on posts and edit text
6 replies · Started by André on January 15, 2021
Hi there! I am trying to make this changes.
1. Move the Categoty and Tag metadata to the top of posts, right after the titlle. I have followed this instructions https://generatepress.com/forums/topic/putting-blog-post-category-on-top/ and it somehow worked (but the icons dont show). I would like the icons to show as they "normaly" do. Like this https://tinyurl.com/y3hdjtzy
2. Then, I would like to highlight each category/tag name like this https://tinyurl.com/y6km8sgx. I would use one color for Categories and another one for Tags. And remove the comas between names.
Can you help me with this?
Thanks,
André
Hi Andre,
1. The topic you link is the out-dated method.
Can you try using this filter instead?
https://docs.generatepress.com/article/generate_header_entry_meta_items/
2. Can you open a new topic for this so we can handle one question at a time?
https://www.screencast.com/t/w7bh9XhJ
Thanks :)
Hi Leo, thanks for you reply.
As suggested, I have used the following snippet mentioned at https://docs.generatepress.com/article/generate_header_entry_meta_items/
---------
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'date',
'author',
'categories',
);
} );
-------------
I have deleted "date" and "author" lines, because I only want to show Categories and Tags.
How would like to show here, bellow the titlle, exactely what it shows "normaly" at the end of the posts. Like this https://tinyurl.com/y37e7u34. But:
- Icons (folder and tags) are not showing
- I would llike to have Catgories and Tags in separate lines, like
You can please check the test post https://xswebpt.com/como-fazer-bem-alguma-coisa/
Thanks,
André
PS - I opened a new topic for number 2
Hi Leo, how are you?
Do you guys have any suggeston on this? Is it possible to "simply" show Categories and Tags in the top of the post rather than on the bottom?
Thanks
Hi there,
sorry your last reply slipped through our system.
To display the icons and the cats / tags on separate lines, keep the changes you have made so far and add this CSS :
.entry-header .cat-links,
.entry-header .tags-links {
display: block;
}
.entry-header .cat-links:before,
.entry-header .tags-links:before {
display: inline-block;
}
Hi David! No worries.
I will not pursue this solution as it doesnt looks with cats/tags color background and I dont feel the need to explore further (with the icons, mean)
https://tinyurl.com/y3x79ay6
But the code is hany if I decide in the future to move the cats/tags up the post. Thanks! :)
André
Glad to be of help.