Title: Cannot redeclare previously declared functions
Last modified: November 6, 2017

---

# Cannot redeclare previously declared functions

 *  Resolved [stixtsr](https://wordpress.org/support/users/stixtsr/)
 * (@stixtsr)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/cannot-redeclare-previously-declared-functions/)
 * Hi. im trying to use this function for my child theme and i have this error. 
   Pls advice. Thanks.
 * The code snippet you are trying to save produced a fatal error on line 56:
    Cannot
   redeclare generate_comment() (previously declared in /home/site/public_html/stagings/
   content/themes/generatepress_child/functions.php:6)

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

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/cannot-redeclare-previously-declared-functions/#post-9657431)
 * What’s the full code you’re trying to use?
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/cannot-redeclare-previously-declared-functions/#post-9864811)
 * It looks like the function you are trying to use is already present in your child
   theme. You don’t need the function to be declared twice, so it would probably
   be a good idea to remove one of those instances.

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

The topic ‘Cannot redeclare previously declared functions’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/cannot-redeclare-previously-declared-functions/#post-9864811)
 * Status: resolved