- This topic has 9 replies, 3 voices, and was last updated 4 years, 9 months ago by Tom.
-
AuthorPosts
-
July 5, 2019 at 3:26 am #949646Evita
Hello there,
I’m changing the position of my meta data on single posts:
– Post category above post title
– Post date and tags on bottom of single post1. I used this topic to move the post category above the post title (this worked well for me):
https://generatepress.com/forums/topic/putting-blog-post-category-on-top/2. And I used the Github code (only post date & tag code) from this topic:
https://generatepress.com/forums/topic/move-author-date-to-the-bottom-after-content/However.. number 2 is a bit tricky. In my single posts I use multiple hooks in the “after_content” area. Currently the post date & tags appear above these hooks.
I would prefer to use a hook to display the post date and tags, so I can prioritize this hook and put it at the very bottom of the post content. How should I approach this?
July 5, 2019 at 8:39 am #949907LeoStaffCustomer SupportHi there,
We can actually do this for the footer meta:
https://docs.generatepress.com/article/generate_footer_entry_meta_items/Let me know if this helps π
July 6, 2019 at 9:50 am #950624EvitaHello Leo,
Thank you for your reply!
I activated the code from the Documentation page. The meta data appears above two hooks which I inserted in the “after_content” area. Is there a way to show the meta data below these hooks?
The post date is also present below the post title. Is there a way to remove it? If I change the Customize settings and remove the post date from single posts, it disappears at the bottom of the post too.
July 6, 2019 at 2:55 pm #950778LeoStaffCustomer SupportInstead of using
after_content
, can you try adding those two hooks usingafter_entry_content
like this?
https://www.screencast.com/t/wKwdqlyrHWNLet me know π
July 6, 2019 at 5:47 pm #950845EvitaThank you for the suggestion! Yes, that worked for me to change the order of the hooks π
About the post date: it appears twice in the single posts now (below post title & post bottom). Do you know how I can prevent it from showing up below the post title? I only need to display the post category above the post title (which I found a solution for in another topic).
July 6, 2019 at 5:48 pm #950846LeoStaffCustomer SupportCan you try unchecking the option here?
https://docs.generatepress.com/article/blog-content-layout/#archivesLet me know if it hides both…
July 7, 2019 at 2:51 am #950990EvitaHello Leo,
I’ve unchecked the post date option for single posts. The post date below the post title has disappeared, but the post date at the post bottom too. Plus the post category is now missing (above the post title).
For the post category I used this topic:
https://generatepress.com/forums/topic/putting-blog-post-category-on-top/July 7, 2019 at 8:38 am #951278TomLead DeveloperLead DeveloperThis should remove it from below the post title:
add_filter( 'generate_header_entry_meta_items', function( $items ) { return array_diff( $items, [ 'date' ] ); } );
Let me know π
July 8, 2019 at 12:13 am #951673EvitaHello Tom, that worked for me π
Thank you both for your support!
July 8, 2019 at 7:54 am #952113TomLead DeveloperLead DeveloperGlad we could help π
-
AuthorPosts
- You must be logged in to reply to this topic.