• I am developing a plugin for wordpress that requires additional form fields to be added to the Simple Edit Post Form. The following is some example code.

    function myFunction(){
    echo(“Hello World”);
    }

    add_action(‘simple_edit_form’,’myFunction’);

    Now, when I click ‘Write’ in the wordpress administration section, I do see “Hello World” printed below the default Simple Edit Post Form. However, when I click ‘Manage’, then click ‘Edit’ for a given post, my plugin does not output “Hello World” below the Simple Edit Form. Why? My plugin only seems to be called when creating a new post, not when editing an existing post. Is this a feature or a bug? Or is there something in the above code that is not correct? Any and all help is greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • However, when I click ‘Manage’, then click ‘Edit’ for a given post, my plugin does not output “Hello World” below the Simple Edit Form. Why?

    Because you’re on longer on the “simple edit” page. Insert an additional action to have it appear on the advanced form page as well:

    add_action('edit_form_advanced', 'myFunction');

    Thread Starter uncmacguy

    (@uncmacguy)

    Thank you! That did it. I appreciate the help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘‘simple_edit_form’ action hook not working?’ is closed to new replies.