Problem Placing in Widgets
-
I originally posted this elsewhere in the forums and the moderator directed me to post it here. This was my original post.
I used the following snippet in my functions.php file. It worked as far as allowing shortcodes to work in widgets, but it’s messing up my other widgets.
// Enable shortcodes in widgets
add_filter(‘widget_text’, ‘do_shortcode’);First it’ll cause the other widgets to want to align to the right of the widget with the shortcode. I have a widget though that doesn’t fit on the right so by default it falls below the shortcode widget where it’s originally supposed to be. The second problem is it changes the font of my widget titles by making it a smaller size and regular instead of bold. Not sure if there’s another snippet someone could give me to fix this.
Example: https://primemedicaltraining.com/heartsaver-cpr-aed/
The shortcode is: [ahm-pricing-table id=373 template=”smooth” currency=”$”]
I added a sample widget so you can see how it aligns to the right of the first widget which is my pricing table shortcode. The 3rd widget is aligned underneath the 1st widget because of it’s size but the title of the widget should be bigger and bold.
This was the reply I got.
one problem is that the shortcode seems to be outputting invalid html be opening 4 divs and only closing three divs;please post in the plugin’s https://www.ads-software.com/support/plugin/pricing-table
what is the exact full content you are adding into the textwidget(s)?
a side problem also seems to that the widgets are not wrapped each in its own container – what is the code of register_sidebar() in functions.php?
to fix the widget title issue, try to add this to style.css:
.widget-title { clear: both; }
Me: What should I do?
- The topic ‘Problem Placing in Widgets’ is closed to new replies.