I have been using the following code to set the column width on certain pages within a wordpress site:
if ( is_page_template( 'fullwidthhome.php' ) ) {
global $content_width;
$content_width = 1080; /* pixels */
}
elseif ( is_page_template( 'wideContent.php' ) ) {
global $content_width;
$content_width = 1080; /* pixels */
}
This works great on pages with custom templates, but I not quite sure how to get it to work for custom post types.
It doesn't seem to work when I set the the template to that of my custom post type:
elseif ( is_page_template( 'single-widecontent.php' ) ) {
global $content_width;
$content_width = 1080; /* pixels */
}
Any thoughts?
TIA!
Steph