Title: Question about functions.php
Last modified: August 20, 2016

---

# Question about functions.php

 *  [Adam](https://wordpress.org/support/users/cscottrun/)
 * (@cscottrun)
 * [14 years ago](https://wordpress.org/support/topic/question-about-functionsphp/)
 * Accoding to the codex this loads before any file (correct me if I am wrong), 
   so How is it that frameworks are able to create a custom-functions.php and those
   functions in there are run, before the rest of the theme?
 * Example,
 * Lets say in my theme framework I have some pluggable function
 *     ```
       if(!function_exists('function_name')){
           function function_name(){}
       }
       ```
   
 * If in my functions, or custom-functions.php I define that method function_name(){}
   every thing works out and is happy.
 * How ever if in my functions or custom-functions.php I say:
 * require_once(‘path_to_file.php’) where path_to_file contains the definition of
   that method function_name() I get an error. Saying it was already defined in 
   such and such file on such and such line.
 * Yes I can define it in the functions.php or custom-functions with no error? I
   just cannot link to a file, in the functions or custom-functions that defines
   it?
 * why? if the case is, that the functions.php or custom-functions.php runs before
   any theme file then the fact that I am linking to a file that redefines the method
   should not be an issue.
 * thoughts?

The topic ‘Question about functions.php’ is closed to new replies.

## Tags

 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [methods](https://wordpress.org/support/topic-tag/methods/)
 * [pluggables](https://wordpress.org/support/topic-tag/pluggables/)
 * [running](https://wordpress.org/support/topic-tag/running/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Adam](https://wordpress.org/support/users/cscottrun/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/question-about-functionsphp/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
