• Hi,

    i want to write a script and add a post to database using wp_insert_post

    Please provide a simple example of how to do this!

    I have gone through https://codex.www.ads-software.com/Function_Reference/wp_insert_post.
    But im confused how to start writing it.

    In which place should i write the script. Is it as a plugin?

    Please provide a simple helloworld program & steps to insert a post to wordpress using this method.

    —————
    Sample Post
    —————

    Title – This is Sample Post
    Content – This is a Sample Description
    Category – Uncategorized
    post status – Publish
    type – post
    post author – zerandib1
    post date – current date/time

    How can to interpret the above sample post to insert to the database using wp_insert_post()

    Looking forward for the step-by-step guidlines

    regards,
    zerandib

  • The topic ‘Add posts using wp_insert_post’ is closed to new replies.