Other Documentations
How to fix breaking sidebar by eventon widget
October 18, 2021
Does your website sidebar break after adding an EventON widget? Do all the widgets that appear after the EventON widget show elsewhere? If any of the above things happen for you please try the below fix.
Fix
Open function.php file from wp-content/themes/– your active theme folder
Paste the below code anywhere in the functions.php (top part of the file would be better so you might not break any other functions)
1 2 3 4 5 6 7 8 9 10 11 12 13 |
add_action('eventon_before_widget', 'eventon_widget_fix'); add_action('eventon_after_widget', 'eventon_widget_fix'); add_action('eventon_before_widget_SC', 'eventon_widget_fix'); add_action('eventon_after_widget_SC', 'eventon_widget_fix'); function eventon_widget_fix(){ echo ""; } |
Reason for this happening
Some themes, as we have found out, try to hook into either only before or only after the widget actions. This breaks the HTML of the front-end widget. So the above code makes sure those injections through hooks are not added to EventON widget.
Did this article help you? If not, send us a ticket via helpdesk