Block class shows on the front end.

Hi @barndog,

Thanks for reaching out, and I apologize for the issues you are experiencing.

I have taken a look at the page, and it appears that you are also using Genesis Blocks for the container around the Gallery. I have attempted to replicate the issue on my end and am unable to do so. The visibility class is applied correctly, and no extraneous text is printed on the page.

Would you be able to provide the other blocks inside of the Container? They look to be third-party blocks, so the name of the plugin(s) would also be useful.

I would also try and create a fresh Container block and add a simple paragraph of text to the container. Then apply the visibility condition to the Container, and see if the issue also happens on this setup.

I look forward to hearing from you.

Best,
Nick

Hi Nick, Thanks so much for your super fast response. The Gallery plugin is Meow Gallery. The visibility class was set on both the gallery and the outside container. I removed the block visibility settings from the gallery block and just kept it on the outside container, and all is well.

Leslie

Thanks for the follow-up Leslie. I took a look at the Meow Gallery block, and it indeed does not support the screen size condition. It handles the frontend rendering of the block content in a very unique way.

That said, the next version of Block Visibility will include a notice and ensure that extra class content does not get printed on the page. In these situations, your fix is the perfect one. Simply wrap the block in a Container or Group block and apply the condition to that.

Please don’t hesitate to reach out if I can be of further assistance.

Best,
Nick

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer