Hello there,
I have my own HTML template for the Hero widget as initialised by the following code:
function custom_hero_template_file( $filename, $instance, $widget ){ return get_stylesheet_directory() . '/widgets/hero.html.php'; } add_filter( 'siteorigin_widgets_template_file_sow-hero', 'custom_hero_template_file', 10, 3 );
Inside my template I have altered the HTML for each frame so as to add an outer DIV element for the purposes of styling a textbox to house the written content.
foreach($instance['frames'] as $i => $frame) { $frame['content'] = '<div class="hero-textbox">' . $frame['content'] . '</div>'; $instance['frames'][$i] = $frame; } $this->render_template($instance['controls'], $instance['frames']);
This was working fine and was published live. However unless the timing is a coincidence, since the latest updated for the Widget Bundle dated today 3rd March (v1.8.1), my “hero-textbox” DIV as defined above is being stripped out from the final output.
Furthermore, heading elements such as H1 and H2 as part of the frame content are also stripped out from the final output which surely can’t be right.
Is this change per design or an error during the update? I now have a live site where all Hero instances are completely broken – https://www.croydonukip.org.
Any thoughts? A swift reply would be most welcome given the urgency.
Regards,
Chris Mendes