Custom Post Layout Hook does not work
-
Hi, I want to customize Post Layout by using this hook:
https://github.com/YMC-22/YMC-Filter/blob/main/README.md#custom-post-layout
Why? I want to use some shortcode, but I need to pass there the actual post_id (like: [shortcode id=”{postID}”]). I did not find any simple solution for that in your builder, so I want to override post Layout and make it possible from the code.
I added code in my theme functions.php:add_filter('ymc/post/layout/custom_880', function($output, $post_id, $filter_id, $popup_class, $term_settings) {
$output = 'TEST';
return $output;
}, 10, 5);I assume that all items in my filter will show just text: TEST, but I still see my layout from Structural builder. I searched your plugin code, and I do not see any calls for apply_filters(ymc/post/layout/custom…. Is this functionality ready to use or I should do more to make it work?
You must be logged in to reply to this topic.