Title: duplicate functions.php renamed diff folder.
Last modified: August 22, 2016

---

# duplicate functions.php renamed diff folder.

 *  [Orange Web Dev](https://wordpress.org/support/users/orange-web-dev/)
 * (@orange-web-dev)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/duplicate-functionsphp-renamed-diff-folder/)
 * I’d like to add a file branding.php It would act exactly as the functions.php
   allowing me to customize login page and dashboard.
 * I’d like this to be a separate file rather then putting it into the functions.
   php
 * I really don’t see where the functions.php is called from.
 * I’d also like to maybe put it in the wp-admin folder or somewhere not reliant
   on theme.
 * Where should I put this file, and what code should I add to call it?
 * Thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/duplicate-functionsphp-renamed-diff-folder/#post-5911154)
 * The `functions.php` file is called from somewhere deep in the inner workings 
   of WordPress (it’s not that hard to find really, but I haven’t needed to look
   that far into it yet).
 * To include another file, you can edit your functions.hp file and add in this 
   line (example only… please check on your own system before you do anything).
 * `require_once( __DIR__ . 'branding.php' );`
 * Of course, if you’re going to do this the _right_ way you really should be using
   a [child theme](http://codex.wordpress.org/Child_Themes), and then you can add
   anything that you want into that child theme’s `functions.php` file and it will
   be included automatically.
 *  Thread Starter [Orange Web Dev](https://wordpress.org/support/users/orange-web-dev/)
 * (@orange-web-dev)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/duplicate-functionsphp-renamed-diff-folder/#post-5911156)
 * [@catacaustic](https://wordpress.org/support/users/catacaustic/) Thanks.
 * I’m sure it isn’t to hard to find. I just thought someone on here might know 
   off hand.
 * I am using a child theme. But I’d like for this file to be called to outside 
   of theme if possible.
 * I know it’s the proper WP way. But I still don’t like the idea of something more
   back-end being associated with a front end theme. because i’m not changing the
   front end theme.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/duplicate-functionsphp-renamed-diff-folder/#post-5911164)
 * Any code in themes doesn’t differentiate between front and back end unless you
   tell it to.
 * If you only want it for the admin area, wrap the `require()` statement in a check
   for `is_admin()`.
 *     ```
       if( is_admin() ) {
           require_once( __DIR__ . 'branding.php' );
       }
       ```
   
 * The other option is creating your own plugin that contains your code. That will
   let you do whatever you need to with it, adn it won’t be theme-dependant.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘duplicate functions.php renamed diff folder.’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 2 participants
 * Last reply from: [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/duplicate-functionsphp-renamed-diff-folder/#post-5911164)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
