• Hi,

    So I’ve just made my own template. I want it to use the full width of the screen so I made a copy of the fullwidth template and just simply added content to it and renamed it.

    Now when I use the template the full width isn’t used and I get a sidebar.

    However, if I copy and past my code into the original fullwidth template and update it, the code will work.

    Does anyone have any idea what this could be?

    So just to clarify I’m basically looking to make my template full width, without a sidebar.

    Thanks
    Jake

Viewing 7 replies - 1 through 7 (of 7 total)
  • hannah

    (@hannahritner)

    Hey Jake,
    There’s already a fullwidth template option within the theme. You can select it under the Page Attributes tab in the edit page. Are you saying this isn’t working for you?

    Hannah

    Hey,
    So this theme users a wrapper. The side is hooked into the page.

    You would just need to use a function in your child theme functions.php to unhook the sidebar from your custom template. For an example:

    function kad_sidebar_custom_page($sidebar) {
      if (is_page_template('page-custom.php')) {
        return false;
      }
      return $sidebar;
    }
    add_filter('kadence_display_sidebar', 'kad_sidebar_custom_page');

    Kadence Themes

    Thread Starter Jake Ward

    (@jakeward)

    thanks a lot for your help guys.

    Hannah, I’m trying to create my own template which has the same full width affect as the full width template.

    Kadence Themes, I’ve just put that code (using my template file name) into functions.php and it has had no affect. Any ideas?

    Thanks again
    Jake

    Can you post what is in your functions.php file for your child theme?

    Kadence Themes

    Thread Starter Jake Ward

    (@jakeward)

    When I go into ‘Editor’ I only see the one functions.php.Do you mean this one? I’m a bit unsure about what the child theme is?

    You don’t want to be editing any of the files through the editor. When editing template files, you want to have a child theme so you don’t lose your changes on an update.

    Here is a place where you can read about and download child themes:
    https://www.kadencethemes.com/child-themes/

    You want to place custom functions directly into the functions.php file in your child theme, not through the wordpress editor.

    Yeah so that would be key you shouldn’t be making a custom template in the parent theme to start. Using a child theme is super important for this.

    Kadence Themes

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Removing Sidebar from Template’ is closed to new replies.