Archived topic
Category and tag below the title but only on single post not on the archive
20 replies · Started by jmarc on February 23, 2023
Hello
As Ying asked me, I open a new topic.
I would like category and tag below the title but only on single post not on the archive(homepage). On the homepage, category and tag stay at the defaut place (below excerpt...)
Thank you
Marc
see images in private
Hi jmarc,
Thanks for opening a new topic.
In your case, the easiest option is to create a block element - post meta template.
Choose posts > all posts as the element's location, and choose after_post_title as the template location.
Here's a screenshot for your reference:
https://www.screencast.com/t/2nkwnHCqtIbu
Ying, I'm not using block ...
Even with your image and the video I understand nothing :(
A snippet would be easier no ?
Thank you
Or may be if I give you the acces admin could you please do it ?
Hi Jmarc,
Can you try creating the Post Navigation as it's done in the video first? Upon trying, I believe you'll figure out what needs to be done. If not, feel free to tell us what specific step you're having difficulties with.
Our support scope only offers assistance. We can't make the changes for you as that would be out of our scope.
Hello Fernando
I understand.
By the way the support that GP offers is really great and, once again, I thank all the customers support for their patience and their kind help !
But blocks are a real p*** in the a**" for me... I really don't like it !
I rather not going farther.
I will try to manage my problem with snippet and css...
Have a nice day
MArc
You're welcome, Jmarc!
Try this snippet:
add_filter( 'generate_header_entry_meta_items', function( $items ) {
if ( is_single() ) {
return array( 'categories', 'tags' );
}
return $items;
} );
Thank you Fernando but nothing change with the snippet
Can you display the Post date first to test? Reference: https://docs.generatepress.com/article/blog-overview/
Yes Fernando the date is ok and also the author, both below the title of a single post
Have you enabled it? If not, can you enable it first?
It's enable Fernando you can see it in the site...
How did you add the Snippet I provided?
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets