I am using Weaver II Pro theme 1.3.8 with WordPress 3.5.2

The theme is very flexible and provides many templates. On individual pages, I can even choose which template to use, which is cool and handy.

Is there a way to assign a particular template for a particular custom post type, e.g. no sidebars for bbPress forum pages, or no sidebars for time.ly All-in-One-Event-Calendar, etc?


3 Answers 3


If your theme and plugins follow the basic WP template hierarchy and different content types actually have their own custom post types, you should be able to achieve this through template naming. Learn more from http://codex.wordpress.org/Post_Type_Templates and http://codex.wordpress.org/Template_Hierarchy

Unfortunately many plugins (and some themes too) have their own template structure and this might cause problems.

If you can't use template naming, you can check the current post type inside the main template and output sidebar and other stuff through if-else statements (see example below).

if ( get_post_type() == 'yourposttypewithsidebar' )
    // don't show sidebar

Create a single template, like: single-{post_type}.php in the root of your theme.

see also: http://codex.wordpress.org/Post_Types#Custom_Post_Type_Templates


It depends on how your custom post type is set up. Check on the admin page for the post type and see if there is a box called "Page Attributes." This will allow you to choose from existing templates. Otherwise you will likely have to create your own like others have said. You will need to copy the template for the page that it most closely resembles (i.e. another page that has no sidebar) and save it as single-{post_type}.php for example if your custom post type is called product, it would be called single-product.php.

For bbpress you would have to name the page you want to copy forum.php. Usually you can get rid of the sidebar simply by removing <?php get_sidebar(); ?>but you might have to fix the rest of the content accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.