What I'm trying to do is have a span
tag appear on the top of the post type whenever the post is updated.
The way the page is setup, there is a query of different post types that list jobs currently available. Whenever there is a new job posted, there will be a new post in the post grid with the span 'New' that expires after 14 days.
I'm trying to do the same thing but with an 'Updated' span whenever one of these posts are updated.
This is the code that I believe is responsible for the 'New' span.
<?php if (strtotime($post->post_date) > strtotime('-14 days')): ?>
<div class="new-job-tag"><span>New</span></div>
<?php endif; ?>
I tried to do the same thing for the updated span like so:
<?php if (strtotime($post->the_modified_date) > strtotime('-14 days')): ?>
<div class="updated-job-tag"><span>Updated</span></div>
<?php endif; ?>
but it doesn't seem to be working.
Am I wrong to assume that this line of code is responsible for the 'New' span?
$post->post_modified
instead of$post->the_modified_date