Archived topic
Adding "Last Modified" to Pages (not posts)
3 replies · Started by Simon on February 11, 2020
Hi,
I've searched for this topic and tried the solutions mentioned here:
But I can't get the "Last Modified" dates to appear on my pages.
I suspect this is because I disable the content title (that and I'm an idiot when it comes to these things lol).
I don't have a child theme. So am I right in thinking I need to add PHP (via plugin) and then add some custom CSS code?
Thanks.
Hi there,
Try this:
add_action( 'generate_after_page_title', function() {
if ( is_page() ) {
generate_do_post_meta_item( 'date' );
}
} );
Let me know :)
Thanks, Tom.
Where do I put that code? In the plug-in that allows me to change the php or the additional CSS field?
Hi there,
its PHP - so thats the Code Snippets plugin or in your Child Themes functions.php file