6

is it possible to create posts with a wordpress plugin by entering a title, content, category and custom field (important)? Somehow I can't find anything about it in the documentation: http://codex.wordpress.org/Plugin_API or on Google.

Thanks, Rik.

1 Answer 1

21

The function for doing that is wp_insert_post.

I've always found WordPress reference section a bit of a PITA to navigate. So you might want to bookmark this page - http://codex.wordpress.org/Function_Reference It has a list of all (most) of the available functions for WordPress.

Sign up to request clarification or add additional context in comments.

3 Comments

It looks like there's only support for custom taxonomies and not for custom fields. Is there a way around that?
Since you are new on the site, if you find an answer helpful then it helps to give it an upvote or the check to indicate that it helped solve your problem. Cheers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.