Home › Forums › Support › Remove post date only if post date > 35 days This topic has 1 reply, 2 voices, and was last updated 4 years, 5 months ago by Tom. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts November 5, 2019 at 8:38 am #1054039 Alex Hello, I have seen this post: https://support.rankmath.com/ticket/remove-published-date-from-google-results/ And want to ask how i can add a filter to that function, so the date of the post is not showing in the source code in the posts of more than 35 days. Let me know please, regards! November 5, 2019 at 7:04 pm #1054394 TomLead Developer Lead Developer Hi there, Would the entire post date remove itself? Or only the published/updated? You could try this: add_filter( 'generate_post_date_output', function( $output ) { if ( strtotime( $post->post_date ) < strtotime( '-35 days' ) ) { return ''; } return $output; } ); Let me know 🙂 Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In