Comments danidanito69 started the conversationJanuary 29, 2018 at 9:20amHi,I'm trying to create my custom shortcode, to use it in visual composer.// Shortcode to output custom PHP in Visual Composerfunction my_comments_vc( $atts ) { return ' <?php comments_template(); ?>';}add_shortcode( 'my_comments_vc_output', 'my_comments_vc');And I'm adding [my_comments_vc_output] in my WP page... But is not working. I add that code in my functions.php file... Should I add it in other file?Thank you.Best, Dani.danidanito69 repliedJanuary 29, 2018 at 1:21pmFinally, I add the code in the noheader-page-template.php and it worked fine.Thanks anyway.Best,Dani Sign in to reply ...
Hi,
I'm trying to create my custom shortcode, to use it in visual composer.
// Shortcode to output custom PHP in Visual Composer
function my_comments_vc( $atts ) {
return ' <?php comments_template(); ?>';
}
add_shortcode( 'my_comments_vc_output', 'my_comments_vc');
And I'm adding [my_comments_vc_output] in my WP page... But is not working. I add that code in my functions.php file... Should I add it in other file?
Thank you.
Best, Dani.
Finally, I add the code in the noheader-page-template.php and it worked fine.
Thanks anyway.
Best,
Dani