functions.php of WordPress.
So I wrote them inside a
<script> tag, and that inside of a
"; tags. Now.. I’m unsure of the function working (have not tested that yet), but WordPress is showing again, but.. I’m getting the message
Notice: Undefined variable: group in /home/appelhulp/domains/appelhulp.nl/public_html/wp-content/themes/Divi/functions.php on line 8
Notice: Undefined variable: option in /home/appelhulp/domains/appelhulp.nl/public_html/wp-content/themes/Divi/functions.php on line 9
Notice: Undefined variable: option in /home/appelhulp/domains/appelhulp.nl/public_html/wp-content/themes/Divi/functions.php on line 25
And this is the code file
So my question:
What is the problem and how do I make those messages disappear?
The correct answer
Although I accepted @Burak’s answer, this is only half of the correct answer. Please also see @RahilWazir’s part, which half of his/her answer belongs to the solution. As Burak came with the correct script, RahilWazir came with the suggestion to place it in the
footer.php instead of
functions.php. And placing it there, did the trick. In
functions.php didn’t let me achieve what I was seeking. Therefor, thanks both!