Support » Plugins and Hacks » Hacks » wp_insert_post fron a page

Viewing 2 replies - 1 through 2 (of 2 total)
  • At the top of the form, action is left blank:

    Action specifies where the form should send the data. The php, which handles the data from the form must be saved to a file on your web server, at the root of the wp installation. If you were to name this ‘frontpost.php’, you would amend action as follows:


    That way the form sends the data to the php file, which then processes it.

    Hope that helps – I’m trying to use this too, but i’m getting the following error:

    Fatal error: Call to undefined function wp_insert_post() in /homepages/25/d288611421/htdocs/intranet/front-post.php on line 26

    Something in the php doesn’t seem to be working.

    If action is left blank and you only have _POST info for the title and content then it works, but if you have any fields that are meant to add meta data, then the php breaks and returns a 404 error.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_insert_post fron a page’ is closed to new replies.