set_post_type Wordpress function


Updates the post type for the post ID.



(int) $post_id Post ID to change post type. Not actually optional.
(string) $post_type Optional, default is post. Supported values are 'post' or 'page' to name a few.

Return Type:

(int) Amount of rows changed. Should be 1 for success and 0 for failure.

Define At:


Wordpress Reference URL:

0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×