Home › Forums › Support › Only show published and updated dates if the post is 6 months old or younger This topic has 3 replies, 2 voices, and was last updated 2 years, 5 months ago by David. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts November 8, 2021 at 2:51 am #1995599 Simon I want to show the published (or updated) date below the post (I already opened a topic for that here: https://generatepress.com/forums/topic/show-the-date-at-the-end-of-the-post/ ). Now I want to only show this date if the post is not older than 6 months. Is there a way to do this? November 8, 2021 at 7:24 am #1995891 DavidStaff Customer Support Hi there, Try adding this PHP Snippet: add_filter( 'generate_post_date_output', function($post_date){ if( get_the_time( 'U' ) < strtotime('-180 days') ) { return null; } return $post_date; },15,2); November 8, 2021 at 7:27 am #1995900 Simon works perfectly! thank you November 8, 2021 at 7:51 am #1996072 DavidStaff Customer Support Glad to heat that! Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In