• Hello,
    I am writing a plugin and using wp_insert_posts to insert new Posts into wordpress.

    The content is truncated after html source code tags.

    I am now inserting the posts with a mysql insert sql statement and it is working correctly.

    Somehow during the wp_insert_post the content is lost.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m get error when I use the function:
    Fatal error: Call to undefined function wp_insert_post() in /home/martinso/mysite.com/wp/addpost.php on line 20

    I tested it on localhost too, but i get this error!

    everybody can help me to fix my problem and tel me what dose that mean the error?

    You need to include the wp-load.php file in the top of addpost.php

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