From 8a4e566412c100b9d1eb7b4e165a23de6b72b38c Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 3 Mar 2016 16:47:32 -0500 Subject: [PATCH] need to create and return string not echo everything --- functions.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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'); ?> -- 2.17.1