How to Place WordPress Widgets Only on Certain Pages

By default, WordPress shows the same sidebar widgets on every page. If you need to hide widgets on certain pages, categories, post types, etc, you can use conditional tags.

In order to add conditional tags quickly and easily, you can use the Widget Logic plugin. Download it here: Widget Logic

This plugin adds an input field to every widget, where you can add the conditional tags.

In the example in the screenshot above, the Tag widget will only show on the post with ID 17.

If instead you would like to show the widget on all pages except the post with ID 17, you can put an ‘!’ at the start like this:

!is_single( '17' )

A list of all available conditional tags can be found on the WordPress codex site here.


Angebot anfordern

Ich melde mich innerhalb von 24 Stunden zurück.