Archived topic
Which is the ideal place to insert functions?
7 replies · Started by Zad on August 10, 2018
What is the ideal place to run functions for performance, error handling, saving configurations etc,
I know some of the options we have are:
- function.php file in a child theme ( I use this)
- using the plugin, CodeSnippets (also use this)
- using hooks on GeneratePress (also use this)
Which is the better one to use? I'm considering moving all my functions from my functions.php file onto CodeSnippets.
Hi there,
I would say all in function.php of your child theme if you are already using a child theme.
Let me know if this helps :)
Thanks!
No problem :)
Just to piggyback on this topic, since it was so recent. (Thanks!)
I just installed the child theme (https://docs.generatepress.com/article/using-child-theme/), activated it, and when I go to the Appearance/Themes/Editor I'm still getting the "Heads Up" warning. I see the child CSS Style in the background. Should I need to add a funtions.php to the child theme folder for adding my functions? If so, what is required as a skeleton?
Thank you!
Not quite sure if I understand?
If you need to add functions then yes you will need to create functions.php.
Thanks!
No problem :)