WP overwrites my setup_postdata() setup
Should all CPT “lecture” posts use this template? If so, just rename your file single-lecture.php and place it in the root directory of your theme, and WP will automatically use it due to its template hierarchy. If instead you’re trying to assign this custom template to hand-picked pages, wherever you register your post type, add … Read more