Shortcode snippet messes up sidebar.
-
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 topic ‘Shortcode snippet messes up sidebar.’ is closed to new replies.