set_post_type Wordpress function


Description:

Updates the post type for the post ID.


Syntax:


Arguments:

(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:

wp-includes/post.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/set_post_type


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