Custom sidebars
-
Hi,
I’m using the “custom sidebar” plugin. My problem : when I’m using the custom sidebar in visual composer, widgets are not wrapped. The class which customizes the widget is not working. It miss the html tag around the widget.
Thanks !
N.
-
Hey csccfcommunication,
How are you doing today?
I don’t have a copy of Visual Composer so I didn’t test this but Custom Sidebars allows you to wrap widgets with HTML tags. What you can do is click Edit on specific sidebar in Appearance -> Widget https://monosnap.com/file/4avFBXz4J2yx1BZPKVYoBOTAr6Z6TU
After that check “Advanced – Edit custom wrapper code” https://monosnap.com/file/P5tN11LSDL6WV6FDdwpYLOODWEQV4H. After that you’ll be able to add HTML tags that will wrap the widgets like this https://monosnap.com/file/iGS5pjoSPUDY7SK3PxnrPM6TjXvEi8.
The result on the front should be like this https://monosnap.com/file/NBUNUrYJFQflZCcjT6njfrs0fgJbjL. This means you can simply use those classes that are wrapping your widgets when not using custom sidebars.
Please let me know how that goes 🙂
Cheers,
BojanHi Bojan,
Thanks for your support, I see the trick but it won’t work because class will be the same for each widget, we need a unique class per widget !
Thanks !Cheers,
N.
Hello @csccfcommunication,
You can add unique class to widget. Please see this article http://justintadlock.com/archives/2010/11/08/sidebars-in-wordpress
That code used for before widget field
<div id="%1$s" class="widget %2$s">works also in Custom Sidebars.
kind regards,
KasiaThank you for using Custom Sidebars. I am going to mark this topic resolved because we haven’t heard from you in awhile. If the provided fix did not resolve your issue, we can reopen the ticket. Thanks again!
The topic ‘Custom sidebars’ is closed to new replies.