2

I'm looking for a solution to properly disable the single view for a custom post type. Is it possible in register_post_type ?

0

1 Answer 1

0

Yes, when you are using register_post_type use this.

'publicly_queryable'  => false

Note: This hides your post to display in archive pages also.

3
  • 3
    It will disable the archive page... I'm looking for a manner to disable only the single view... Commented Mar 17, 2017 at 9:49
  • what do you mean by disable single views.?
    – Aftab
    Commented Mar 17, 2017 at 11:19
  • There is an argument called "has_archive". I'm looking for "has_single" Commented Mar 18, 2017 at 7:18

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