Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress - Create post with plugin

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.

like image 635
Rik de Vos Avatar asked Aug 13 '11 21:08

Rik de Vos


1 Answers

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.

like image 71
arunkumar Avatar answered Sep 24 '22 02:09

arunkumar