Is it possible to show the comments and comments form within a View or View template? The only view shortcode I see is Comments Number.
Dear Gregg,
For this you should use the comments_template() function that is normally called from the template file (probably page.php or single.php). Your theme should already be calling this function.
Please let me know if there is anything else that I can assist you with.
Regards.
Caridad
I think it's a little more complicated. I'm actually using this specific View to display a number of returned posts. Can I insert a function into the view? In any case, the distinction is that I'm trying to insert the comments template into a post listing with multiple posts. Is that possible?
Dear Gregg,
You can always resort to creating your own shortcodes. Open the file functions.php in your theme and add these lines to it:
add_shortcode('wpv-post-comments', 'my_post_comments');
function my_post_comments() {
ob_start();
comments_template();
$data = ob_get_clean();
return $data;
}
Please let me know if there is anything else that I can assist you with.
Regards.
Caridad
Thanks Caridad!!! Works great.