WordPress.org

Support

Support » Plugins and Hacks » Hacks » comments_template();

comments_template();

  • Hi,

    Is there away of getting the comments_template(); function to only show when $page[‘comments’] is used? When I do $page[‘comments’] = comments_template(); it still shows the comments template, but not in the place I want it to.

    Any help would be appreciated.

    Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ideally I would like to use get_comments_template(); but that’s not possible!

    try

    ob_start();
    comments_template();
    $page[‘comments’] = ob_get_contents();
    ob_end_clean();

    then
    print_r($page[‘comments’])
    in any place.
    😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘comments_template();’ is closed to new replies.