When you get a block of code to add to your ‘theme functions’, what does that mean and what do you do?
The theme functions are the blocks of code located in the file functions.php that is included in every WordPress theme, including Genesis themes.
Some files in your Genesis theme are templates that are each responsible for a specific type of content on your site – Posts, Pages, archives, the front page etc.
Unlike the templates, the code in the theme functions is run on every page of your site, including those in the admin area. This makes the theme functions an ideal place to store the code that customizes your Genesis site.
Here’s an example of some code that you might want to add to your theme functions. The purpose of this code is to output the ‘last updated’ date.
Copy the code below line 2. In your WordPress admin area, go to Appearance > Editor, and select Theme Functions from the menu on the right hand side.
You should see a notice that your theme inherits from Genesis. If you don’t see this notice, it could mean you’re not running a Genesis theme and it may be a good idea to seek help.
Paste the code into the theme functions. The best place to put it is usually right at the bottom.
Click on Update File and you’re all done.