Use conditionals with wp_enqueue_style to attach stylesheet according to post type displayed

The issue in your first block of code is syntax: if( get_post_type() == ( ‘activity’ OR ‘dining’ OR ‘heritage’ OR ‘hiking’ OR ‘nightlife’ ) ) : this isn’t proper use of OR and will evaluate true regardless of what get_post_type() returns. The issue in your second block is again syntax, you have to break; at … Read more

Does “Custom Post Type” can have page hierarhy option?

You can set a post type to hierarchical when you register it with register_post_type. Simply set the ‘hierarchical’ argument to true. $args = array( ‘public’ => true, ‘publicly_queryable’ => true, ‘has_archive’ => true, ‘rewrite’ => true, … ‘hierarchical’ => true, … ‘supports’ => array( ‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘excerpt’, ‘comments’,’page-attributes’ ) ); register_post_type(‘my-cpt’,$args);