Shortcode Overrides

I am trying to alter the output of the Blog Slider to include the excerpt or an ACF field after the title. I have added hte following in my child theme functions.php, but it is not working -0 it simply loads the default shortcode layout. Any advice greatly appreciated:

function overwrite_shortcode() { 

/* ---------------------------------------------------------------------------
 * Blog Slider [blog_slider]
 * --------------------------------------------------------------------------- */
if( ! function_exists( 'sc_blog_slider' ) )
{
function sc_blog_slider( $attr, $content = null )
{

... customized output ...

return $output;
}
}
}
remove_shortcode('blog_slider');
add_shortcode( 'blog_slider', 'sc_blog_slider' );
add_action( 'after_setup_theme', 'overwrite_shortcode', 11 );

Comments

Sign In or Register to comment.