This should get you started. It checks if the post was posted less than a day ago, and if it was, it will display a label that says new, which you can style.
<?php if(get_the_date('Y-m-d-H-i-s') > date("Y-m-d-H-i-s",strtotime("-1 day"))) { ?>
<span class="new-label">New</span>
<?php } ?>
You need to add this to your theme, in the file that displays posts.
Related Posts:
- Locally change the font family [closed]
- Right align a youtube video
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- Is it possible to bold certain words in a post title?
- Is this the best (and only) option to style CSS for a given post type?
- strip only specific tags (like ), but keep other tags (like )
- Removing the title attribute from links in the post content
- adding a custom css class to post
- HTML code in Custom field
- How to wrap every image in a post with a div?
- Custom colors for post rows based on post meta value
- Paragraphs removed when using get_post_custom()?
- get_post_custom stripping styling issue
- why does HTML Tag not working in Post and Page
- Content editor creating blank paragraphs in spaces and creating   in the_excerpt
- How To Add Perfect Apostrophe And Quotation Mark In WordPress Posts?
- Hide add new page button
- Limit function to specific post category
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- Latest 5 posts (custom post type), each post different CSS
- Add scripts on custom post add/edit pages Not Working
- Add code just after Post content
- WordPress Theory Lesson – Image Columns within posts with alignment?
- WordPress’ visual editor messing up my (nested) lists (and other things as well)
- Articles are text-only in any “Category” instead of HTML
- How to style the last post on the front page different than the others?
- Add a class to post title if a link ends with a certain extension
- How Display Posts on category
- Copying and pasting emoji in a wordpress post
- Ajax Dynamic Archives not showing correct results
- Style Differently Edited Posts
- How to make classes for posts?
- CSS: How can I show a photo beyond the template’s column, but contained within the browser window? [closed]
- Ajaxify This Code
- Pausing and Resuming WP_Query results
- Making a custom Pagination for multi page blog post
- Can I search posts and pages for css classes?
- Is Hfeed class for all pages needed
- How to add tags (custom taxonomy) to post class css?
- Anyone know why wordpress converts some html entities to their numeric equivalents?
- Is there a way to specify an extra class for a post or page with no title?
- How to remove in-line style of WordPress’s post content only?
- Grid post page on WordPress with Bootstrap, the_excerpt(); Problem
- Every second post different class in blog view
- Make a vertical dynamic list of posts in alphabetically order and in columns [closed]
- Best Way to Add UnEditable HTML to Posts
- How to make different custom post layouts?
- Is there any way to stylize articles one by one?
- Font shows up as Arial instead of Times [closed]
- Divs appearing everywhere in post content
- Benefits to using semantic HTML in post content? [closed]
- Creating a WordPress Post via REST API – HTML or Markdown?
- How to style archive post titles… but only those posts who have comments?
- My Custom Post Type Still Using index.php
- HTML Form Submit to table in same page
- Need help removing […] after excerpt
- How can I add a class to particular paragraphs in my post?
- add div after image in post [closed]
- How do I switch css class on post
- displaying the categories post
- How to separate each individual blog post?
- YARPP php question
- How do I apply a template to my single posts?
- Indenting within a blockquote
- Different background colors for posts with WordPress
- Turn off display for custom sidebar post widget when on the post it’s displaying
- How to allow arbitrary inline CSS in posts?
- WordPress 5: prevent link from displaying page title instead of URL
- How to highlight or show new to the particular posts list
- Css and function issue on author archive page
- Remove HTML tags from all posts
- Centre Blog Index (Posts Page) on Home.php
- I have two post types in the same query, how can I use CSS to select only one post type?
- how can i fix my display post in my index.php
- Checking if a post contains an html tag
- How to generate an HTML link automatically from URL in a users’ post
- Show all posts from the tags without having to set all of them
- display content in multiple columns
- How can I alternate styling of images in a post? [closed]
- Hide title in Merlin Theme on posts and pages only
- Adding div to WordPress page content
- How to add a class to links inside posts text
- Posts don’t appear on Template Page
- Background image in posts
- How to get all the terms of a post
- How can i put image to come first than the title?
- Automatically add class to link based on link text
- Change a div background color on Post ID
- How to customize posts in WordPress by using HTML and CSS?
- Wrap posts from a category in HTML
- How to display my categories in a list (to a post, not the sidebar)?
- Difficulty hiding a span per a body class within WordPress
- How can I add a custom caclulation form in post?
- How to automatically convert a form with HTML link into post
- Posts Page in WordPress loading bare HTML of my homepage
- posts blocks don’t show up correctly
- is there a better way of combining this?
- get_permalink executes link without https
- WordPress blog post cloned and stolen?
- Getting the current author (it has changed) of a post, not the original author