Kod tylko dla single page custom post
Jeśli potrzebujemy zamieścić np w headerze lub footerze kod który pobierany jest tylko na wpisach stworzonego custom post’a możemy skorzystać z kodu:
<?php if ( is_singular('project') ) { ?> <?php if ( has_post_thumbnail() ) { the_post_thumbnail('full'); } ?> <?php } else { ?> <?php } ?>