Check if has custom sidebar
-
Is there code I can add to a template that checks if a custom sidebar is being used, and if not, display other content?
This is for a custom post type that has it’s own sidebar-cpt.php
In my site I have set my sidebar with an ID of sidebar-1 to be replaced. I have tried this without success:
if ( is_active_sidebar( 'sidebar-1' ) ) { return; } // alternate content here
I have also tried changing the sidebar-1 string for CustomSidebars and csb_clone.
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Check if has custom sidebar’ is closed to new replies.