Conditionally Load WordPress Widgets With Jetpack’s Widget Visibility Tool

WordPress Jetpack

Jetpack brings a ton of handy features to WordPress, but not all of its 35+ modules will be useful for any single blog. While it’s perfectly fine to turn off Jetpack modules that you’re not going to use, probably the best module you should start using is the widget visibility tool.

Widgets are an integral part of most WordPress blogs. When used properly, they drive engagement by making your sidebar, and other widget ready areas, interesting. But there is no point in showing the same boring list of widgets on every single post and page of your blog. For example, a “recent posts” widget is of little use on the homepage, an ad widget may not look good on your “About” page,  and an Instagram widget may perfectly complement only the image type posts. With the widget visibility tool, all of these and more is possible in a few clicks.

Once you’ve turned on Widget Visibility from Jetpack’s settings page, you will find a Visibility button under every active widget in your site (go to Appearance > Widgets from your WordPress dashboard). Click on the button, and you will be able to add one or more conditions for displaying or hiding the widget. You can see how we have hidden our “recent posts” widget on the homepage below.

Hit the Save button once you’ve added the rules, clear your blog’s cache if you use a caching plugin, and the widget visibility tool will kick into action immediately.

This feature of Jetpack is currently not without its limitations – AND conditions are missing, there is no way to conditionally load widgets by device or screen size, etc. Still, it’s quite useful and will only get better with future updates. You can follow the development status of widget visibility here.

We run automated tests to catch spam, and moderate comments as per our policy. Your comment may take some time to appear below this post.