From a0790eb86b0d4a940a619f134ae4840f614c9855 Mon Sep 17 00:00:00 2001 From: Ace Suares Date: Tue, 19 Nov 2019 13:55:05 -0400 Subject: [PATCH] ob_end_flush(); is needed or else the whole page gets messed up. I don't know why, but the page is totally messed up (the second half of the source code goes on top and the first half on the bottom, which makes a big mess. Adding ob_end_flush(); here prevents that. --- ultimate-posts-widget.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ultimate-posts-widget.php b/ultimate-posts-widget.php index c831cf9..f00d4c0 100644 --- a/ultimate-posts-widget.php +++ b/ultimate-posts-widget.php @@ -214,6 +214,8 @@ function widget( $args, $instance ) { $cache[$args['widget_id']] = ob_get_flush(); } wp_cache_set( 'widget_ultimate_posts', $cache, 'widget' ); + ob_end_flush(); + } function update( $new_instance, $old_instance ) {