Edit the post layout
-
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?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.