Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] How to NOT show a particular widget on a particular page ? (http://forum.bytesforall.com/showthread.php?t=15005)

sober Aug 3, 2011 12:45 PM

[SOLVED] How to NOT show a particular widget on a particular page ?
 
Hi if the widget class is "text-2" and the page id is "26", then what would be the code to NOT show that widget on that particular page. Thanks

lmilesw Aug 3, 2011 01:28 PM

I use the Dynamic Widgets of Display Widgets plugin to do that but the code would be something like the following.
HTML Code:

body.page-id-24 .text-2 {
display: none;
}

But without seeing the page I can't be sure.

sober Aug 3, 2011 03:35 PM

That unfortunately doesn't work at my end. I have only this widget to customize and I would much rather have it via css than by installing a plugin

sober Aug 3, 2011 03:38 PM

But this one is working
Code:

body.page-id-24 #text-2 {
display: none;
}

. May I have 1% credit for the code ? :). Thanks so much

lmilesw Aug 3, 2011 07:13 PM

But you said it was a CLASS of text-2 not an ID so that's cheating.:p


All times are GMT -6. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.