Put a sidebar on some pages

Hello , I wonder if it is possible to put a sidebar on some pages only, and not all ?
If so, how ?
Thank you !


By default, the sidebar is always displayed in all pages and there is no option to hide the sidebar from the theme settings.

But I can help you to hide it using css code. Please let me know the site URL and tell me which page shouldn’t have the sidebar.


Hello, thank you for the answer.
I would sidebar only on this page : http://www.galaxy-monsters.fr/twitch-xixou/
and not on others.
Is it possible ?
Thank You !

Okay, These css code are using page-id as identifier, so if you would to change the page that have no sidebar, so you have to change the css code also.

To get the page-id, you can use chrome dev tools or open the “view source” of your page and try to take the page id. see this screenshot http://prntscr.com/9purla

Here is the css code to hide the sidebar:

body:not(.page-id-13) .site-content {
    margin: 0;
body:not(.page-id-13) .site-sidebar {
    display: none;

If you wish to change to page-id, you can replace from the code above .page-id-13 to .page-id-44 << as example

Hello, thank you for help, I putthis code at the end of css ?
It will display the sidebar on some pages?
Thank You

Hi, sorry for the delays

If you have a child theme, you can put that code in styles.css, but if you don’t have a child theme, you can put the code using simple custom css plugin

Thank you for the answer.

Is it possible to have a different sidebar for each page?
Thank you

Different sidebar for each page?
I don’t think it can be achieve using custom css. You have to make an advance modification of the theme.