Empty Sidebar on Some Pages

  • Author
  • #1380499


    Hello, this is my first time posting on this forum, please move my question to the appropriate page, if necessary.

    I have some widgets that I only want shown on certain pages, and until today, I have had no trouble. However, I just added a widget to the right sidebar for recent posts (shown here: http://johnjberger.com/posts/) and it is doing something with the sidebar on pages which I chose to hide it (shown here http://johnjberger.com/bio/).

    Notice the empty sidebar on the right. I only want this widget to show on the home page, posts page, and on each post, however, it is making this empty sidebar on all pages. Thinking it was an issue with the show/hide feature, I have tried switching between “hide on X, X, X pages” and “show on X, X, X, pages,” but neither seems to have any effect. Any ideas? Thanks.

    The blog I need help with is johnjberger.com.



    Also, the Books page of my site (http://johnjberger.com/books/) is working fine. No sidebar, it is hiding and extending to the edge as it should. Why are the others, which are formatted the same way, messing up?


    Hi John —

    The problem you’re having doesn’t sound like it has to do with Widgets — rather with the Template selection for the pages you don’t want a sidebar on.

    I took a look at the template you’re using and it accommodates 2 Templates for Pages — Default (which includes a sidebar), and Full-width, no sidebar.

    If you create a Page and do not specify that you want its Template to be Full-width, no sidebar, it will have a sidebar area.

    To fix this on the Pages that are already created, such as your Bio page, do the following:
    1. Edit the Page in question
    2. Find the Page Attributes section on the right (if you can’t find it, scroll to the top of the Page and select Screen Options, then check off Page Attributes
    3. In the Page Attributes section, change Template from Default to Full-width, no sidebar.

    Hope that helps!



    Hi harlankellaway,

    Thanks for the comment. I am aware of that function, however, I do want the left sidebar on all pages, but not both. Choosing the full-width, no sidebar option removes both sidebars from the page. Any other ideas?

    I’ve removed the “Recent Posts” widget, and the layout is fine again. No blank sidebars on the right. Not sure what the issue is, but I’ll keep it this way unless I find a fix.


    When you use visibility on the widgets it hides only that widget. It will not hide an empty sidebar. We can hide the right sidebar on those pages though with CSS by targeting specific pages by their page ID. The following example targets your Bio page:

    .page-id-1244 #tertiary {
        display: none;
    .page-id-1244 #primary {
        width: 73%;
    .page-id-1244 .three-columns #secondary {
        margin-left: -100%;

    There are two ways to find the page ID. Once is to go to pages > all pages, hover over the page title at left and look in the status bar on your browser and you will see something similar to this at the end of the URL:


    2239 is the page ID number in this example.

    The second way is to view source in your browser while on the page you want the ID of, and then in the opening body selector will be the page ID class similar to this:

    <body class="home page page-id-2239 …>

    2239 would be the page ID of that page.

    Let us know if you have any other questions or problems.



    Thanks for the response, I’ll try that out and get back to you with the result.

    The reason I am confused is because the Recent Posts widget is the only one causing the blank right sidebar. I have other widgets in the right sidebar that are hidden/shown on certain pages and behave fine. Maybe it’s a glitch in the template?


    If you can add the widgets back into the right sidebar and set the pages to show the sidebar, and then let me know which page(s) is/are exhibiting the issue I can take a look and see if I can figure out what is happening. In my test blog, everything appears to be working fine, but I might be missing something.

The topic ‘Empty Sidebar on Some Pages’ is closed to new replies.