php – Custom post type is_singular condtional not working when managing sidebar display

Question

I am using the if ( is_home() || ! is_page_template( array( 'template-investment.php', 'template-tourism.php' ) ) || ! is_singular( 'listing' ) ) { conditional to control the display of the theme’s sidebar in certain instances on my client’s theme.

It is working for the is_home and ! is_page_template conditionals, but not the is_singular for the listing custom post type (Toolset plugin).

The body classes for the single listing pages are included below.

listing-template-default
single
single-listing
postid-3119
logged-in
views-template-content-template-for-listings

As single-listing is included, I would assume it should be working.

Would the dynamic nature of how Toolset creates templates be causing conflict?

0
Mike Hermary 1 month 2022-10-21T17:26:19-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse