From: Steve Sutton Date: Thu, 3 Mar 2016 21:47:32 +0000 (-0500) Subject: need to create and return string not echo everything X-Git-Tag: v1.0.0^2~115 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=8a4e566412c100b9d1eb7b4e165a23de6b72b38c;p=WP-Themes%2FDiscoverKZOO.git need to create and return string not echo everything --- diff --git a/functions.php b/functions.php index c547244..748adf3 100644 --- a/functions.php +++ b/functions.php @@ -166,29 +166,31 @@ add_action('thematic_searchloop', 'mytheme_search_loop'); // add shortcode for the landing page blocks function landing_page_blocks( $atts ) { + $out = ''; extract(shortcode_atts( array('category' => '-1'), $atts, 'glm-blocks') ); if(function_exists('fetch_all_glm_blocks')): $category = filter_var($atts['category'], FILTER_VALIDATE_INT); $blocks = fetch_all_glm_blocks($category); - echo ''; endif; + return $out; } add_shortcode('glm-blocks', 'landing_page_blocks'); ?>