Title: get_comment_form() returns empty
Last modified: August 31, 2016

---

# get_comment_form() returns empty

 *  Resolved [salthareket](https://wordpress.org/support/users/salthareket/)
 * (@salthareket)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/get_comment_form-returns-empty/)
 * TimberHelper::get_comment_form() returns empty for new added posts after WordPress
   4.5.1 update.
 * [https://wordpress.org/plugins/timber-library/](https://wordpress.org/plugins/timber-library/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [jarednova](https://wordpress.org/support/users/jarednova/)
 * (@jarednova)
 * [10 years ago](https://wordpress.org/support/topic/get_comment_form-returns-empty/#post-7326468)
 * Thanks for the note [@salthareket](https://wordpress.org/support/users/salthareket/)—
   try `{{ function('comment_form') }}` which will directly call WP’s `comment_form`
   function
 *  [J](https://wordpress.org/support/users/carlosreynolds/)
 * (@carlosreynolds)
 * [10 years ago](https://wordpress.org/support/topic/get_comment_form-returns-empty/#post-7326495)
 * Hey Jared,
 * Thanks for posting a workaround, I’m getting the same error.
    Any chance you 
   can help me with this coding?
 * `$context['comment_form'] = TimberHelper::get_comment_form();`
 * Your help would be much appreciated.
 * Cheers
    James
 *  [oxyplay](https://wordpress.org/support/users/oxyplay/)
 * (@oxyplay)
 * [10 years ago](https://wordpress.org/support/topic/get_comment_form-returns-empty/#post-7326499)
 * Hello guys,
    got same problem after updating on few sites. Checked timber-helper
   from previous version and found that get_comment_form will be deprecated. “0.21.8
   use `{{ function('comment_form') }}` instead”.
 * **So i stopped with two solutions:**
    1. For comment form without arguments just
   use `{{ function('comment_form') }}` in your template. 2. For arguments i used`
   $context['comment_form'] = TimberHelper::ob_function('comment_form', array( $
   args, null ) );`
 * I wrapped in ob_function because if i use directly like in timber-starter-theme`
   $context['comment_form'] = comment_form();` i got messy code with comment form
   on page top.
 * Hope it will help someone.
 * Regards,
    Max
 *  Plugin Author [jarednova](https://wordpress.org/support/users/jarednova/)
 * (@jarednova)
 * [10 years ago](https://wordpress.org/support/topic/get_comment_form-returns-empty/#post-7326506)
 * [@carlosreynolds](https://wordpress.org/support/users/carlosreynolds/) [@oxyplay](https://wordpress.org/support/users/oxyplay/):
   The new version of Timber (1.0.2) restores the old comment_form function and 
   adds a new `{{ post.comment_form }}` method
 *  [J](https://wordpress.org/support/users/carlosreynolds/)
 * (@carlosreynolds)
 * [10 years ago](https://wordpress.org/support/topic/get_comment_form-returns-empty/#post-7326508)
 * Thanks [@jarednova](https://wordpress.org/support/users/jarednova/). I’ve kept
   my initial coding and updated to 1.0.3 and it seems to be working fine.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘get_comment_form() returns empty’ is closed to new replies.

 * ![](https://ps.w.org/timber-library/assets/icon-256x256.png?rev=1482054)
 * [Timber](https://wordpress.org/plugins/timber-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/timber-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/timber-library/)
 * [Active Topics](https://wordpress.org/support/plugin/timber-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timber-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timber-library/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [J](https://wordpress.org/support/users/carlosreynolds/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/get_comment_form-returns-empty/#post-7326508)
 * Status: resolved