• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Chad Ritchie

Graphic Designer, Front-End Web Developer

  • Blog
    • WordPress
  • Projects
    • Graphic Design
    • Web Projects
  • Photos
  • Services
  • Contact

WordPress Custom Functions File

February 3, 2014 By Chad Ritchie

To add custom functions to a WordPress theme could be as simple as adding them directly to the themes functions.php file. However, if you update that theme, those functions will be overwritten, losing the custom functionality that your site may depend on. One option is to setup a custom functions.php file.

Step 1

lib.png

Create a folder within your child theme named “lib”

Step 2

my_functions.png

Within the new “lib” folder, create a file named “my_functions.php”

Step 3

code.png

Paste this code in your my_functions.php file

<?php
//* My Custom Functions

Step 4

Save the file

Step 5

custom.png

Paste this code in your themes current functions.php file

Step 6

Save the file

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X

Filed Under: Blog, WordPress

Footer

Chad Ritchie Web & Graphic Design