BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Remove sidebar from CPT
- This topic has 5 replies, 3 contibutors, and was last updated 9 years ago by
Anonymous.
Question
March 11, 2016 at 3:51 am #62516@kasperoeHi guys
I’ve made a custom post type using this plugin:
http://codecanyon.net/item/post-type-builder-wordpress-custom-post-types/11833291The result is here:
http://videles.dk/kollektiv/toustrup-mark/But how can I make the sidebar disappear? Themify tells me to talk to you:
I’ve reviewed your site. And the issue is actually with the theme that you’re using. Please allow me to explain, when you create a custom post type and view a single post it goes to the default theme post layout. The default theme post layout is with the sidebar. Please find the option to remove the sidebar as the default layout.
Can you help me out? Thank you! 😉
– Kasper
Answers
March 13, 2016 at 12:29 pm #62799@
AnonymousHi @kasperoe, You can also select a page without Sidebar. Just select the page template to Fullwidth Content.
Regards
March 14, 2016 at 1:28 pm #62964@kasperoeHi Pallavi
This is not available for this post type I guess? :s
Kasper
March 15, 2016 at 1:54 am #63054@
AnonymousHi @kasperoe, You will have to create a new separate ‘single.php’ for your CPT check the following article to create Post Type Templates
https://codex.wordpress.org/Post_Type_TemplatesRegards
March 16, 2016 at 4:13 am #63242@kasperoeOkay so I copied the single.php and named the file single-kollektiv.php
Where do I put this, and now what? 🙂
March 17, 2016 at 2:04 am #63520@
AnonymousHi @kasperoe,
You can add this file inside child theme folder.Inside file single-kollektiv.php
To remove sidebar you can replace line 13-17<?php if ( is_active_sidebar('sensei-default') || is_active_sidebar('learndash-default') ) : ?> <div class="page-right-sidebar"> <?php else : ?> <div class="page-full-width"> <?php endif; ?>
with
<div class="page-full-width">
and also comment or remove line 175-177
if ( is_active_sidebar( 'sidebar' ) ) : get_sidebar( 'sidebar' ); endif;
Regards
Varun Dubey
- The question ‘Remove sidebar from CPT’ is closed to new replies.