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 the end of every switch case or the other statements after it get executed.
Related Posts:
- Style custom columns in admin panels (especially to adjust column cell widths)
- One Site. One Theme. Multiple Stylesheets without plugins?
- How do test if a post is a custom post type?
- Conditional for single-{post-type}.php
- Why is style.css not being enqueued?
- How to enqueue style before style.css
- Avoid to load default WP styles in login screen
- How to add a CSS class to every image in a Custom Post Type
- is_singular() not working if called via callback function of admin-ajax.php
- functions.php conditional tag only for custom post type
- Exclude custom function content from certain pages
- Get template part based on custom taxonomy term
- If on term-page -> get the current term?
- CSS for Custom Post Types
- Is it possible to insert text into an html tag using functions.php?
- custom post type upcoming post and past post
- changing default comment form arguments [duplicate]
- How do you use JavaScript to detect the homepage
- Load custom css after bootstrap
- The correct way to include JavaScript and CSS in my WordPress Themes
- is_page_template not working as expected
- Add the current menu item CSS class to a custom page type archive in WordPress menu
- different template for first and second level custom post page
- remove child post from custom post type archive
- Relative path in wp_register_style not working
- Change post featured image on hover
- if custom posts type exists and there are posts load script
- Custom post type and body_class: Remove “blog” class
- Changes in enqueued / registered stylesheet paths not updating—why?
- Need help targeting a custom post type with conditional tags
- Why would this IF statement not work? [closed]
- custom comments on specific post type
- Excluding custom post types
- Is possible add class for last post of Custom Post Type?
- Enqueueing scripts and styles multiple CPTS
- Customize my custom taxonomy table in Admin panel
- Register widget only page is a singular of custom post type
- Is there a conditional tag to determine whether the post is _any_ custom post type?
- Conditional Query of Custom Post Type and custom taxonomy
- How to Create Columns with WordPress and CPTUI display page ?
- How to run filter only on custom post type edit screen
- How do I view registered syles and scripts for enqueue
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom Post Conditional for Parent & Child Single.php?
- Conditional for a Single Post That Belongs to a Category?
- How to show only the most recent post on my custom post type archive?
- my custom css file downloads then it STOPS!
- Conditional Tags for specific category of custom posts
- Add custom CSS class to custom post type
- Split Media Queries in different files!
- Move Genesis Single Page/Single Post Title
- Give each post type label a different color?
- How to check if post/page or taxonomy post is published by admin
- TinyMCE Buttons on Certain Post Type
- Displaying custom post types as a gallery
- Display message if no posts in Custom Post Type loop
- Showing taxonomy terms on custom post type
- I can’t add CSS with functions.php
- Check if custom post is a parent?
- Trying to add a class to post links
- Posts are not rendering perfectly [closed]
- Questions regarding add_meta_box()
- Redirect to URL if x number of days passed
- comments hooks on custom post type
- Conditional Statements
- If custom taxonomy else conditional [closed]
- If tag exists, then echo once
- Show specific content on parent custom post type and all children
- Multiple Stylesheets For Post and post type?
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- DIVI Theme customizer changes not applied on existing pages and designs are not shown on the front
- Custom post type not pulling CSS
- How can I check the rewrite slug of current post type listing page
- Is it possible to link an external stylesheet, exclusively within a specific single post template?
- How to add custom PHP code in post header?
- $_SESSION Not working after X amount of page views
- Loading a stylesheet on a specific page [duplicate]
- Change Background Color For CPT Template
- conditional based upon the count of current user’s published custom posts
- Custom metabox fields not saving when limited to a certain CPT
- Can not hook into custom post type template with: is_page() conditional?
- Modify arguments for parent theme’s `wp_register_style` via child theme
- Diffrent search templates for different post types
- Conditional Tags If Custom Post Parent & Child?
- Can’t open Custom Post Types Link in navigation
- Multiple search template with separate stylesheets
- Multiple Block Quotes without using HTML
- Custom Post Query Combined with Conditional Tags
- How to insert post into a page?
- Conditional statement checking two conditions for CPT and Custom Taxonomy [closed]
- strange conditional tag behaviour [duplicate]
- Woocommerce product page is not showing custom css [closed]
- WordPress custom post type odd and even styling [duplicate]
- How do I target a links only in a custom post type and only in the p tag?
- Add a background image into a post [closed]
- How to create my own style.css file in an wordpress child-theme
- Custom post type is_singular condtional not working when managing sidebar display
- how to display custom taxonomies in front page
- Anyway to assign custom post types to a specific category?
- How could I create a ‘private comments’ section on a custom post type?