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 );