• Hi,

    I have a few widgets in the sidebar. I am trying to disable just one of those widgets (it’s an Adsense ad) on one specific post.

    I know there are plugins, but I’d rather use a code snippet than add another plugin to the site.

    Is there any way to do this manually?

    By the way, I am using a Genesis child theme if that matters.

    Thanks very much in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I like the plugin “widget context” for this. You could probably do it manually, so download that plugin, look at it’s code, and see how it filters/enables/disables widgets on a per-page basis,

    You can hide a widget using CSS, for example:

    In pseudo code: hide the textwidget #text-3 on .post-123

    In CSS the code would look something like this:

    .post-123 #text-3 .widget .widget-area .textwidget {display: none;}

    • This reply was modified 4 years, 3 months ago by linux garage.
    • This reply was modified 4 years, 3 months ago by linux garage.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to disable a sidebar widget on a specific post’ is closed to new replies.