I am excited to announce that version 1.1.0 of Block Visibility Pro is now available. This is the first major release since its launch back in June 2021. Pro is the premium add-on for the core Block Visibility plugin, which is freely available on WordPress.org.
URL Path Control
The URL Path control allows you to conditionally display blocks based on the URL of the page that the block is on. While Pro already includes the Location control, which was designed for location-based visibility, the URL Path control provides an additional level of flexibility.
For example, if you wanted to display a block on the archive page of the “Destinations” post category, the URL path might look like this.
This can very easily be done using the Location control. But what if you also want the block to show up on the archive pages of any sub-categories of the “Destinations” category? For example:
Again, you could use the Location control and manually select the “Mountains” and “Beach” categories. But if a new sub-category was added in the future, you would have to go back and add it in the Location control settings.
While updates to the Location control are planned in the future, which will include settings for this functionality, the URL Path control can tackle this effortlessly. By simply entering the following path, the block will be visible on the “Destinations” archive page as well as the archive pages of any sub-categories.
Visit the Knowledge Base for additional information on the URL Path control.
Browser & Device Control
The core Block Visibility plugin includes the Screen Size control, which allows you to conditionally display block content based on the width of the screen. This is useful for responsive design, especially on mobile devices. While the Screen Size control works great, it uses CSS media queries to show content dynamically. This means block content is still loaded on the page, whether it’s visible or not.
The new Browser & Device control works at the server level by detecting the user’s current browser and device properties from the user agent string. Any content that is “hidden” will not be loaded to the page.
It is important to note that browser detection using the user agent is historically very difficult and may not always be ideal for your website. That said, this has been a common feature request, the implementation in Pro has been conservative (only major browsers/devices are supported), and the detection accuracy ratio is approximately 99.95%.
So while there are limitations, this control allows you to do some pretty neat things. For example, let’s assume your website has some custom functionality that really works best on Google Chrome. You want to create a message for non-Chrome users to let them know they may have a sub-optimal experience. Simply create your messaging, configure the Browser & Device control, and voilà!
Visit the Knowledge Base for additional information on the Browser & Device control.
Version 1.1.0 also included a few minor bug fixes. The most notable was an issue with license activation when a user had the Easy Digital Downloads – Software License plugin installed on their website. View the Changelog for all additional fixes.
For the next couple of weeks, development for Block Visibility Pro will focus on enhancing the Location, WooCommerce, and Easy Digital Downloads controls. While they are already quite powerful, we want to address a handful of feature requests and improve their capabilities. Highlights include:
- Parent and child controls for post types and taxonomies in the Location control.
- The ability to display a block based on when a customer last purchased a product from your WooCommerce or Easy Digital Downloads powered store.
- Support for displaying blocks based on product variants (i.e. variable pricing) in Easy Digital Downloads powered stores.
If there is functionality that you would like to see, or you have a pre-sale question, please do not hesitate to reach out.
Thank you for your interest in Block Visibility Pro. If you haven’t already, give the core Block Visibility plugin a try. It’s free!
Until next time…