Title: Adding a function
Last modified: August 18, 2016

---

# Adding a function

 *  Resolved [PressedForTime](https://wordpress.org/support/users/pressedfortime/)
 * (@pressedfortime)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/adding-a-function/)
 * I need to add some common code in several functions. The functions will be in
   myfunctions.php
 * I want to be able to code
 * if ( function_exists(‘myfunction_1’) )
    myfunction_1();
 * Where do I put myfunctions.php in order for this to work? Right now it acts like
   the function does not exist.

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

 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/adding-a-function/#post-262777)
 * Put your functions in my-hacks.php and enable the my-hacks option in the admin
   miscellaneous section.
 *  Thread Starter [PressedForTime](https://wordpress.org/support/users/pressedfortime/)
 * (@pressedfortime)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/adding-a-function/#post-262781)
 * Worked perfectly,thanks.

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

The topic ‘Adding a function’ is closed to new replies.

## Tags

 * [function_exists](https://wordpress.org/support/topic-tag/function_exists/)

 * 2 replies
 * 2 participants
 * Last reply from: [PressedForTime](https://wordpress.org/support/users/pressedfortime/)
 * Last activity: [20 years, 6 months ago](https://wordpress.org/support/topic/adding-a-function/#post-262781)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
