Adding conditional content to single post-type template
Firstly you’d be better off creating a template file for your specific post type by creating a file called single-newsletter.php. WordPress will pick it up and use it automatically. Secondly add this function to your functions.php and call it to work out if it’s the most recent one: function is_latest_newsletter( $post_id = 0 ) { … Read more