You can use output buffering to achieve this effect:
function get_comments_form() {
ob_start();
comments_form();
$commentsform = ob_get_contents();
ob_end_clean();
return $commentsform;
}
$commentsform = get_comments_form();
You can use output buffering to achieve this effect:
function get_comments_form() {
ob_start();
comments_form();
$commentsform = ob_get_contents();
ob_end_clean();
return $commentsform;
}
$commentsform = get_comments_form();