0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | function jma_gbs_template_redirect() { $body = true; add_action( 'genesis_before_sidebar_widget_area', function () use ($body) { jma_gbs_open_div($body); } ); add_action( 'genesis_before_loop', function () use ($body) { jma_gbs_open_div($body); } ); add_action( 'genesis_after_sidebar_widget_area', function () use ($body) { jma_gbs_close_div($body); } ); add_action( 'genesis_after_loop', function () use ($body) { jma_gbs_close_div($body); } ); } add_action('template_redirect', 'jma_gbs_template_redirect'); |