Sure, you can do something like this in your template code:
<?php
$migrate_date = mktime(0,0,0,1,1,2012);
if ( get_the_date('U') > date('U', $migrate_date) ) {
echo "<p>New</p>\n";
} else {
echo "<p>Old</p>\n";
}
?>
Related Posts:
- How to output comments number of a post per day?
- If modified on same day, show only time
- Update all comments time to random dates?
- Display the first post’s comments of category in comments.php template
- How to get post creation date?
- Changing the post date and time with function
- Is it possible to Schedule Attachments in WordPress?
- Allow variable amount of comments before pagination
- How can I allow editors to leave comments on posts that have not yet been published?
- featuring old articles without messing up with the archive
- Accessing $post variable from template part
- Only display posts with comments
- Comments enabled, but disabled at the same time
- Comments not showing in custom post type – WordPress
- Use template of parent category for single post sub-categories
- loop not displaying posts on custom template page
- Human Time Diff, change mins to minutes
- Enable commenting on front-end preview page for pending posts
- Display custom post types by date field
- Including text at the end of every post
- Adding variable for post title so post template can include auto-generated link to view on external website.com/{post title}
- Fetch posts from current week (Sunday to Saturday)
- How to display different single post template based on author?
- WordPress 4.4 release produce blank white images when sharing a post on Facebook etc
- How to set post expiration date and time and move the page to archive after expiration [closed]
- Why is WordPress redirecting users to random posts after commenting?
- How to get most recent commented post above new submitted post in WordPress?
- Display page content AFTER a loop of posts
- how to find user ids of all commenters in a post
- Single post as homepage?
- Diplay comment date on WP_Post_Comments_List_Table
- Change post_date to post_modified date on post template?
- Facebook Share Thumbnail
- Automatically republish old posts
- What part of template to edit to remove category name from the top of posts?
- Add custom Facebook share link with share count and variable text
- How can I show many posts an author has per week?
- How can I pass the ID of a post to a page template by clicking a url?
- How to allow logged in users to post anonymously
- Facebook doesn’t display the related thumbail for some posts
- Emojis replaced by ‘?’ automatically
- Sharing post from archive page (loop) doesn’t work
- Send post id through ajax and get the post content back
- WordPress Sidebar menu for posts based on date – guidance needed
- Customizing Comments on Posts
- date issue with category post retrival
- What do comments with […] mean?
- How to get date of post when using wp_get_recent_posts()?
- How to get posts and comments amount per hour, per year and per month?
- Hide a specific post from a page template
- How do you change the comment count in the back end posts list, to reflect unapproved comments, rather than all comments?
- Let both the admin and post author update comment meta
- How to get posts published on the latest date?
- Why won’t pagination work?
- how to set social icons to product / post template (Auros theme)? [closed]
- How to style archive post titles… but only those posts who have comments?
- How to update all posts at once?
- showing posts of an specific category in admin custom menu with style of admin posts section
- How does WP decide how to display a page
- Display a post via template
- Single post full screen template not inheriting WordPress role permission
- wp_query if have posts show date but not in loop
- Display on page every post in blog WITH comments
- Showing recent post of category in page
- Getting an extra post’s meta data?
- Plotting posts on a graph
- Custom post type and taxonomy page templates
- How to implement a WordPress comments function?
- Count the total views of all user posts published
- Shortcode for Comments and Comment Boxes in Post Loop
- How do I change the template specifically for single posts?
- My website is showing today’s date instead of published date since db migration to a new wordpress
- How can I change the date format of the revision list?
- Remove the URL author of post on all comments
- Customizing a new page used for blog posts with Avada theme
- WordPress weird behaviour on comments
- Comments are in database, don’t show up in WordPress backend or frontend
- How do i search post by jquery datepicker?
- Compare date of user’s last posts
- Adding post date to ACF field
- single- and archive- templates not being applied to custom post types, not even after flushing permalinks
- Embedding Facebook in blog post not working
- How to enable comments meta box for other author posts?
- Facebook share thumbnail not showing until refreshed
- Comments as part of a post
- how to remove entry meta from wordpress archive category and change its display
- 3rd Party Login in wordpress
- Apply comment to different post (not the current post) [duplicate]
- Send and Embed Vine (in WP Post) on Facebook
- How to arrange different post categories in template
- how to style an individual page in a category [duplicate]
- Creating / Editing a post from within site template
- the_time() cannot be placed correctly
- WordPress “Posts Page” isn’t showing template dropdown
- How do I create a template page to show 3 blog posts?
- How to add a new page that will function as a separate blog/news article page
- excerpt in template for specific page
- How does WordPress add the comments and comment form to posts
- Exclude posts by date – related post
- Best method for comment section associated with different images?