Hiding/removing the sidebar widget on 1 page

  • Unknown's avatar

    Hello! I have a sidebar widget on the right side of my site called “What’s New?” in which I announce news.

    I was wondering if there is a way to remove the widget on 1 page only of my site? (Yet keep it on all other pages.)

    The page that I would like it to *not* appear on is the page that is called “Acting Resume”

    Any advice would be appreciated!

    Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    You can choose to hide it on specific page

    Widgets

  • Hi there.

    The page @banhao recomended you is perfect to understand how to do it!

    And then, you can build your selector using .page-id-21 as this is your target page class and aside#text-3, as this is your ‘What’s new?’ widget name.

    So, finally, you can add to your custom css, the following code:

    .page-id-21 aside#text-3 {
        display: none;
    }

    I hope this helps!

  • Unknown's avatar

    Thank you both (banhgao & raulanton) very much. I followed the instructions on the page you’d recommended, and I successfully removed the Widget from one page of my site (‘Acting Resume’).

    However, now in place of it there is a shaded box called “Archives” and a shaded box called “Meta”. I’d like to get rid of these also.

    raulanton, I’m not sure I understand what you mean when you mentioned building my selector (sorry, I’m new to this!)…what outcome does that achieve? I did enter the CSS you mentioned.

    When I’m in the customizer, and I hover over the 2 rectangles I mentioned (Archives & Meta), there is a little button that becomes visible over them called “Edit”, but when I click on it, nothing happens. Thanks again, guys!!

  • Unknown's avatar

    Hi there, add the following to your CSS to remove the sidebar and take the content full width.

    .page-id-21 #secondary {
        display: none;
    }
    .page-id-21 #content {
        margin-right: 0;
    }
  • Unknown's avatar

    Thank you so much!! That worked brilliantly!!

  • Unknown's avatar
  • The topic ‘Hiding/removing the sidebar widget on 1 page’ is closed to new replies.