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 posts published between a date and today?
- How to get post creation date?
- How to make comments work for a post loaded per Ajax?
- Changing the post date and time with function
- Post/Page Preview Template
- Is it possible to Schedule Attachments in WordPress?
- Allow variable amount of comments before pagination
- How to get Images included in Post
- using wp_update_post on save_post
- get comments and get posts in loop
- How to put last edited entry on top of the blog-post list?
- Query posts from current year
- My ‘post attributes’ is missing from my WordPress install
- How to display comments and comment form on custom post type?
- posts page – different lengths of excerpt
- Comments are assigned to wrong or related post
- How can I allow editors to leave comments on posts that have not yet been published?
- Update existing post dates to random dates
- Update post date on every new comment?
- featuring old articles without messing up with the archive
- Forcing oembeds to top of post
- Facebook sharing link is not showing a thumbnail of the images within the post?
- One comment per user email per post
- Can’t show comments count per post outside loop
- Accessing $post variable from template part
- Only display posts with comments
- Comments enabled, but disabled at the same time
- how to show all post in my page-grid.php template page
- Comments not showing in custom post type – WordPress
- How to display an icon when a new post is published and then remove it when a specific time past?
- 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
- Hide comments awaiting moderation from user who submitted the comments
- Including text at the end of every post
- How can I display a specific user’s first published post?
- custom single.php not working
- Adding variable for post title so post template can include auto-generated link to view on external website.com/{post title}
- Can wordpress differentiate between added and updated posts?
- 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
- Hide Post comments when displayed via WP_Query
- Including new Javascript only after a comment is made
- How only display all post related to category
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- Disable Post/Page comment emails for creators
- Display posts with comments closed, with pagination?
- 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
- Different template for posts of all subcategories of category
- When trashing a post, also trash related comments
- Custom Post Templates
- how to find user ids of all commenters in a post
- Multiple social buttons with a fast loading? [closed]
- Single post as homepage?
- Templating of a specific post ID
- Diplay comment date on WP_Post_Comments_List_Table
- Display post from specific date
- Get random posts between specific dates / of specific age
- XML-RPC and post_date
- Posts vs. Pages
- Category Template: Need to display different content on first page of archives
- Change post_date to post_modified date on post template?
- Facebook Share Thumbnail
- Automatically republish old posts
- count the total number of comments the user has received for his published posts
- What part of template to edit to remove category name from the top of posts?
- Replace ‘published on date’ with ‘modified on date’ on Posts
- pre_get_posts query between 2 dates (date stored in custom post meta)
- How to Orderby Comments by post title?
- 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
- Email entire post contents
- Query get post,how to add comment box
- Using custom post template
- What is the filter or hook to add admin controls to posts on the front end?
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- Setting posts_per_page for taxonomy term template
- Enable Comments Box On Custom Post Type
- Turn On Comments On Custom Post Types in Directory Theme
- Switch to page template when using post permalink
- Genesis + Ajax + Jquery | Failling to call action
- Emojis replaced by ‘?’ automatically
- Sharing post from archive page (loop) doesn’t work
- Move comments only from one WP installation to another
- Get Page ID of blog homepage
- Send post id through ajax and get the post content back
- WordPress Sidebar menu for posts based on date – guidance needed