Edit the post layout | WordPress.org

Based on this https://github.com/YMC-22/smart-filter?tab=readme-ov-file#layouts

I put this text in my functions.php file:

function my_custom_post_layout($layout, $post_id, $filter_id, $increment_post, $arrOptions) {  
$layout="<h2>".get_the_title($post_id).'</h2>';
$layout .= '<p>Custom text here</p>';
$layout .= '<a href="'.get_the_permalink($post_id).'">Read More</a>';
return $layout;
}
add_filter('ymc_post_custom_layout_4628_2', 'my_custom_post_layout', 10, 5);

But the default layout is still showing. I am sure that my FilterID and LayoutID are correct. Am I missing anything?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer