Home>Support>Use own Template for Post Carousel Widget

Use own Template for Post Carousel Widget

I’m using the SiteOrigin Post Caousel Widget and want to use my own template to display the post loop.

I found the filter “siteorigin_widgets_template_file” but can’t get it working to use my template instead.

Here is my code

function serpentine_post_carousel_template_file( $filename, $instance){
    if( !empty($instance['design']['theme']) && $instance['design']['theme'] == 'test' ) {
        $filename = get_stylesheet_directory() . '/tpl/base.php';
    }
    return $filename;
}
add_filter( 'siteorigin_widgets_template_file_sow-post-carousel', 'serpentine_post_carousel_template_file', 10, 3 );

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More