Title: moving functions?
Last modified: August 19, 2016

---

# moving functions?

 *  Resolved [cybershot](https://wordpress.org/support/users/cybershot/)
 * (@cybershot)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/moving-functions/)
 * I am trying to figure out how to modify a wordpress function. I thought the add_action
   function was suppose to allow you to do this. I want to take the custom fields
   function out of the admin folder and move it into the themes functions.php file.
   But I can’t figure out how to do that. This will be a theme that I plan on distributing.
   I want to add fields to the custom fields box. That is the purpose of moving 
   the function.

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

 *  [GabrielCol](https://wordpress.org/support/users/gabrielcol/)
 * (@gabrielcol)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/moving-functions/#post-1930955)
 * What is the exact function that you want to move? I can’t see the purpose here.
   If you think that the users that will user the theme will don’t have that function
   in their wp files, test if funtion exists and if not, define it.
 *     ```
       if(!function_exists('the_functions_you_are_searching_for)) {
            fuinction the_functions_you_are_searching_for() {
                // the function stuff here
            }
       }
       ```
   
 *  Thread Starter [cybershot](https://wordpress.org/support/users/cybershot/)
 * (@cybershot)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/moving-functions/#post-1931197)
 * You know the custom fields in the post editor? It is really easy to get the key,
   value pair from custom fields. Then you can press that nice button to add another
   one or delete the fields. I want to expand on the custom fields and add more 
   inputs. Right now, you just have key, value. I want key, value 1, value 2 value
   3. I want to group them together. But I need to hook into the function from the
   theme files.
 * The function that runs the custom fields is in wp-admin\includes\template.php
   and it is called meta_form()
 * I want to move or hook into that function so that I can add my extra inputs. 
   I have been trying for days.

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

The topic ‘moving functions?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [cybershot](https://wordpress.org/support/users/cybershot/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/moving-functions/#post-1931197)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
