• Resolved ESSBEEAY

    (@essbeeay)


    Hi,
    How can I hide the sidebar? I’m installed on localhost so can’t supply a link, but I have no content (widgets) in the sidebar, but it still displays as an empty column on my page. How can I remove it totally?

    And is there a way to have the sidebar on certain pages, but not on others, so that I can effectively have a full-width-page if I’d like?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Cecilia @ Developers On Hand

    (@ceciliadevelopersonhand)

    Hi @esssbeeay, you need to create a childtheme for your chosen themes. Then create a page template for full width.

    Moderator Kathryn Presner

    (@zoonini)

    ESSBEEAY – if you’d like to remove the sidebar on certain static pages only, then Cecilia’s suggestion above is a good one.

    The best way to make changes to a theme is to use a child theme, so any tweaks will be overwritten and lost every time you update the theme. Here are some guides in case you haven’t made one before:

    https://codex.www.ads-software.com/Child_Themes
    https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/
    https://op111.net/53/
    https://vimeo.com/39023468

    Keeping your theme up-to-date is important so you’ll get all the latest bug and security fixes, as well as keep the theme compatible with the latest version of WordPress core.

    Here is the Codex guide on creating a page template:

    https://developer.www.ads-software.com/themes/template-files-section/page-template-files/page-templates/

    You’ll need to remove any call to the sidebar in your new page template and add CSS to expand the width of the main column so it fills the entire width of the page.

    If you want a full-width page anywhere other than static pages (i.e. particular posts, blog page, etc.) then you can accomplish that with custom CSS alone, and you don’t need a child theme – you can use a custom CSS plugin like the CSS Editor module in Jetpack or a standalone CSS plugin.

    If you need help going either route, let us know.

    Thread Starter ESSBEEAY

    (@essbeeay)

    Thank you Celia & Kathryn. Great advice!

    I created a child theme, followed instructions for creating a custom page template and it all works. No more sidebar.

    However I still need to add CSS to make the main column fill the entire page width of the page and to remove padding and the border currently set up between the content area and the (now empty) widget area.

    If I have any trouble I’ll call out ??

    Moderator Kathryn Presner

    (@zoonini)

    Glad you got your custom template working. You should now have a unique body class that you can reference with CSS to target only pages using that specific template. Good luck!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide Sidebar’ is closed to new replies.