WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please help with this code for custom post type "video":

If is single-video.php page {

     list custom-taxonomy of video. Example actors

} Else { do nothing }

I´m tried with is_single, is_singular, is_page_template but imposible.

share|improve this question

According to the WordPress conditional docs it should be:

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

     //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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.