Hi,
I’ve made a little function that helps you to achieve this.
Just replace the shortcode ( [vc_posts_grid loop="size:10|order_by:date|post_type:post"] ) with your desired shortcode.
$shortcode = ‘[vc_posts_grid loop="size:10|order_by:date|post_type:post"]‘;
COPY CODE
function CustomKleoAddContentAfterPost( $content ) {
if( is_single() ) {
$shortcode = '[vc_posts_grid loop="size:10|order_by:date|post_type:post"]';
$content .= '<h4>Kleo Posts Grid</h4>';
$content .= do_shortcode($shortcode);
}
return $content;
}
add_filter('the_content', 'CustomKleoAddContentAfterPost');
You need to put this snippet to your kleo-child/functions.php
Best Regards
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution