• Resolved cybershot

    (@cybershot)


    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)
  • 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

    (@cybershot)

    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.