Conditional for single-{post-type}.php

According to the WordPress conditional docs it should be:

if ( is_singular( 'video' ) ) {
     // do conditional stuff

} else {
     //do other stuff
}

Also if you want a blank page or no content to show when the CPT is not video you don’t really need the else so you could omit it. You could ALSO do something like:

if ( ! is_singular( 'video' ) ) {
     // do nothing

} else {
     //do conditional stuff
}

Leave a Comment

techhipbettruvabetnorabahisbahis forumutaraftarium24edueduedueduseduseduedueduseduedus