I refactored the if conditional using suggestions from Jacob Peattie and the following fixed my issues.
if ( ! is_page_template( array( 'template-investment.php', 'template-tourism.php' ) ) && ! is_tax( 'listings' ) && ! is_singular( 'listing' ) ) {
The result correctly removed the sidebar.php from loading its code on specific templates, taxonomy, and single post type.
Related Posts:
- is_page_template not working as expected
- Clean URL permalink for custom post type
- Custom post type loops with different page templates
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Using wordpress template tags within an array
- Template code to split a post and print a custom field?
- Load info from customposttype into template page
- Accessing download link from the loop with WP Download Manager Pro
- Why isn’t my custom post type using the corresponding custom post template?
- PHP Button Custom link [closed]
- How do test if a post is a custom post type?
- Get custom post_type’s archive URL
- Custom Post Types 404 Issue
- Template for specific post of custom post type
- List page for custom post type?
- Loading custom page template via plugin
- Apply template to custom post type
- Custom page type – template under page attributes?
- Single page template for custom post_type
- Remove header and footer but KEEP all css and js etc for a custom post template?
- Display children and grandchildren of a custom post type
- Conditional to modify query results
- WP_Query is printing out only one post when posts_per_page is set to multiple
- WP Query to displaying date and posts for that date?
- Return array of categories to php function for current post
- Create a random unique 6 digit number as custom field for custom post type
- Loading all files within a directory
- Get rewrite slug of custom post type in template
- How to make a field appear only if a post meta field has a defined value?
- Template for custom post with custom taxonomy
- Is there a conditional tag to determine whether the post is _any_ custom post type?
- Redirect 404 page with ID in slug to associated page with same ID in slug
- Content vs Template on custom post
- Template for all categories of a custom post type?
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- Template files for Custom Post Type and Taxonomy
- WP_Query Custom Post Type if Category ID Equals
- Control content before and after custom post type loop
- How to use a variable as a function name?
- Creating Sections for Post Types
- Different options per post type in WP_Query
- How do I create a new post upon registration with the users first and last name as title
- Creating a non-hierarchical Taxonomy that behaves like categories
- Shortcode is displaying the content on top of the page [duplicate]
- Custom Ratings for Theme, Proper way to Refactor Code and Clean up Template File
- How to set the mainpage of a custom post type?
- custom post type by author – wp job manager
- Get template part with CPT and Custom Taxonomy conditionals
- Using Wp_Query, Json to add Highcharts series data
- Displaying a list of Contacts
- How to change single custom post template by custom taxonomy?
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Setting a homepage – doesn’t seem to work
- Let users upload image(s) to the post from front end
- Using page title as a link to term archive
- How to display custom post type only on a certain page?
- Setup page template array in a custom post type
- Function to allow single post template based on custom taxonomy?
- Custom Post Type, Custom Taxonomy Template: How to get current taxonomy name?
- How do I ensure that post_type and Taxonomy use the same slug?
- pagination for custom post type archive page
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- Is it possible to get the specific content on the search page?
- Custom post type defaults to index.php for archive page
- Set a template on a custom post in the plugin
- Persist meta box choices throughout all posts of same post type
- Do not show child pages within a file page
- Search result based on URL
- Custom search for a custom post type in WordPress
- Question on templates
- Assign for all post of a post type a specific single-post template
- Taxonomy template file not working with a taxonomy that contains a slash
- How to mix 2 kinds of post types
- How can I load Template file from wordpress plugin
- Show custom taxonomy not in submenu
- Loop carousel slider in wordpress
- Custom Post save causes 500 error
- Custom post tag images not displaying with ACF
- WordPress Custom taxonomy template
- Use one template for different custom post types with the same markup
- Function not pulling image or text from custom post type
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- WordPress Custom Post Type and sort by Tags
- Diffrent search templates for different post types
- Custom template support for custom post type?
- Looping taxonomy in taxonomy?
- Permalink of Custom Post Type
- posting twice from an array?
- Pagination not working on homepage
- Custom Post Type Template Based on Page Slug?
- Order custom post type is beign ignored
- How do I filter a custom post type loop by a field?
- How to manage wordpress knowledge base/wiki/posts collections
- Getting ACF relationship field information
- Send email on creation of custom post type and use get_post_meta()
- Just the First Metabox what saves the data!
- Why isn’t page attributes dropdown not showing up in a custom post type