custom post type

I created a custom post type with it’s own taxonomy. Except for color changes in the style.css, I haven’t made any other changes. Everything looks and works great. However, the sidebar is missing when I view anything related to the custom post. In particular, it’s missing the sidebar on single post view and archive. I tired creating a template page and calling in the sidebar with some php like following

<?php get_sidebar( ‘right’ ); ?>

That didn’t get me anywhere.

Is there a way to get the theme to recognize the custom post as needing a sidebar?

Most likely your code is missing travelify_main_container which is defined in content-extensions.php and controls how and where sidebar is displayed.

Let me know if this is the case.

No, I don’t think that’s the case. I’m using an unmodified archive.php and page.php file to view the custom post. Therefore, the travelify_main_container should be there, right. Could it be that I need to add and “if” statement or something to the content-extensions.php so that it recognizes the custom post type. Right now the travelify_main_container portion is unmodified.

Thanks

Hmm, didn’t know that is_archive doesn’t apply to custom type archive and you have to define it separately. You might want to try to add this

is_post_type_archive('YourCustomCostType')

To travelify_main_container to see if it will apply correctly.

okay, i tried adding it to line 20 which now reads as follows. Still no luck though.

if( empty( $layout ) || is_archive() || is_search() || is_home() || is_post_type_archive('cpt_products')) {
		$layout = 'default';
	}

I figured out the problem. It had to due with an installed widget. Once disable, all works as it should. Thanks once again for your prompt response and excellent work.

Much gratitude