Archived topic
How to place the post date above the post header
12 replies · Started by Peter Islin Nielsen on January 13, 2016
Hi Tom,
Is there a way to place the post date above the post header without editing the PHP files? It should be on both the blog page and on the post pages itself. I hope it makes sense :-)
Thanks!
/Peter
Hi Peter,
Without using PHP it's not possible - even with it's kind of difficult (but possible).
I see the need/want to do something like this, so I'll look into making an adjustment that makes it easier :)
Hi Tom,
OK, thanks. It's not a biggie, so for now I'll just try to pursuade the designer to keep it as it is :-)
/Peter
I'll update this post when I have something figured out :)
In 1.3.29 you'll be able to do this:
add_action( 'after_setup_theme', 'generate_move_post_meta' );
function generate_move_post_meta()
{
remove_action( 'generate_after_entry_title', 'generate_post_meta' );
add_action( 'generate_before_entry_title', 'generate_post_meta' );
}
Great, Tom! Thanks for letting me know :-)
No problem :)
To avoid making a new thread I'm hoping maybe to find help here as I am trying to do something similar. I'm looking to move the post date above the post header but only on the single article page. Anyone have any suggestions?
Hi there,
What about the other post meta like the author? Also above the title, or still below?
Hi Tom,
Not sure if I have missed something with the code but when I insert it, I am able to change position but I get two dates displaying.
add_action( 'after_setup_theme', 'generate_move_post_meta' );
function generate_move_post_meta()
{
remove_action( 'generate_after_entry_title', 'generate_post_meta' );
add_action( 'generate_after_entry_content', 'generate_post_meta', 20 );
}
Any ideas? This screenshot shows you that the date appears at the bottom but the one below the title remains and is not removed.
https://gyazo.com/22b35a04a4085a7fcb769e095f520c2a
Never mind I managed to sort it. Thanks.
Can you please tell me how you did it? I was unable to remove the original date. Now I see 2 dates.
Screenshot
Hi there,
can you raise a new topic where we can provide some options to do this.
