Site logo

Archived topic

Don't display one sidebar widget on one page

5 replies · Started by Edin on November 29, 2018

Viewing posts 1–6 of 6

Hello,

Is there a way to NOT display a certain sidebar-widget on one particular page? Without the use of a plugin?

I have a text widget in the sidebar with my photo and a link to the /about page. I don't want this widget ON the about page.

Any way to do this without the use of a plugin?

Thanks,
Eddie

Hi there,

you could hide it with this CSS - the first class is the body class for that specific page.

.page-id-5 .inside-right-sidebar #text-7 {
    display: none;
}

Thank you, David.

Is that the best solution regarding keeping the site lean and speedy? Also, I remember reading somewhere that Google dislikes display: none.

Its the simplest method. And would not be detrimental to speed. Consider the image would have been loaded/cached from other pages being viewed.

Google frowns upon display: none where people use it to hide loads of keywords behind completely unrelated content. This use is very acceptable.

Thanks, David!

You're welcome

This archived topic is closed to new replies.