I am using the following code to set the column width on some pages within a WordPress site:
if (is_page_template ('fullwidthhome.php')) {global $ content_width; $ Content_width = 1080; / * Pixel * /} otherwise (is_page_template ('wideContent.php')) {global $ content_width; $ Content_width = 1080; / * Pixel * /}
This works great on pages with custom templates, but I'm not sure how it should work for custom post types.
This does not look like when I set up my custom post type template:
elseif (is_page_template ('single-widecontent.php')) {global $ Content_width; $ Content_width = 1080; Class = "post-text" itemprop = "text"> About this function get_post_type ()
/ P>
No comments:
Post a Comment