Skip to content

Instantly share code, notes, and snippets.

View karenalenore's full-sized avatar

Karena Kreger karenalenore

View GitHub Profile
// Execute Shortcodes in Widgets
add_filter( 'widget_text', 'shortcode_unautop' );
add_filter( 'widget_text', 'do_shortcode' );
add_filter( 'the_excerpt', 'shortcode_unautop' );
add_filter( 'the_excerpt', 'do_shortcode' );
add_filter( 'the_title', 'do_shortcode' );
// Customize the return to top of page text
add_filter( 'genesis_footer_backtotop_text', 'opensky_footer_backtotop_text' );
function opensky_footer_backtotop_text($backtotop) {
$backtotop = get_bloginfo('description');
return $backtotop;
}
// Customize the post meta function
add_filter( 'genesis_post_meta', 'opensky_post_meta_filter' );
function opensky_post_meta_filter($post_meta) {
// Column Shortcodes
add_shortcode('column', 'opensky_col_function');
function opensky_col_function( $atts, $content = null ) {
extract( shortcode_atts( array(
'class' => '',
'width' => '',
), $atts ) );
return '<div class="' . esc_attr($width) . esc_attr($class) . '">' . opensky_strip_autop(do_shortcode($content)) . '</div>';