BuddyBoss Home – Web Support Forums Themes Boss. theme Remove sidebar from CPT

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Question

    #62516
    @kasperoe

    Hi guys

    I’ve made a custom post type using this plugin:
    http://codecanyon.net/item/post-type-builder-wordpress-custom-post-types/11833291

    The 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

    #62799

    Anonymous
    @

    Hi @kasperoe, You can also select a page without Sidebar. Just select the page template to Fullwidth Content.

    Regards

    #62964
    @kasperoe

    Hi Pallavi

    This is not available for this post type I guess? :s

    Kasper

    #63054

    Anonymous
    @

    Hi @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_Templates

    Regards

    #63242
    @kasperoe

    Okay so I copied the single.php and named the file single-kollektiv.php

    Where do I put this, and now what? 🙂

    #63520

    Anonymous
    @

    Hi @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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The question ‘Remove sidebar from CPT’ is closed to new replies.