Plugin Author
Ajay
(@ajay)
Hi,
The reason this get’s stripped out is because I have wp_kses_post being run on the HTML so as to ensure that it is compatible with the post HTML that WordPress allows.
https://codex.ww.wp.xz.cn/Function_Reference/wp_kses_post
You can strip out this function from:
https://plugins.trac.ww.wp.xz.cn/browser/contextual-related-posts/trunk/admin/admin.php#L75
Thanks. Rather than stripping out core code, I used the following workaround:
- added
<ul class="replace"> to ‘HTML to display before the list of posts:’
- Added to following php to my page template:
$related = do_shortcode('[crp limit="6" heading="1" cache="1"]');
$related = str_replace('replace"','kopa-featured-news-carousel" data-pagination-id="#single_related_posts_pager" data-scroll-items="3"',$related);
echo $related;
Hope this is useful to others.
Plugin Author
Ajay
(@ajay)
This is definitely a good workaround, since you won’t need to edit any of the plugin files!