I have an issue in which I’ll write up my posts on Saturday and schedule them for the week.
The post_modified_date shortcode to use in the GP header seems to be looking at that specific date, instead of the date it got posted as the time it was last updated (Which is how it should be)
This is my code snippet for PHP:
function post_modified_date() {
return get_the_modified_date();
}
add_shortcode( 'modified_date', 'post_modified_date' );
I then end up with the following:
<meta property=”article:published_time” content=”2020-10-16T09:30:03+00:00″ />
<meta property=”article:modified_time” content=”2020-10-12T01:54:05+00:00″ />
I would assume that it being posted, is a time it was last updated, eg. “modified” so shouldn’t the modified_time show the same as the published_time until such time that I update the post again, then the modified date would change which is what I would expect.
Is this not how it works? And if not is there anyway to achieve it? It seems rather odd that it would use a modified date at a time that the post didn’t even exist to the public on the website (Only admin backend)
Thanks guys.