get_post_type [ WordPress Function ]
get_post_type ( $the_post = false )
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Similar Functions: get_post_types, set_post_type, get_post_time, get_post_mime_type, get_post_mime_types
Retrieve the post type of the current post or of a given post.
Examples [ wp-snippets.com ]
Top Google Search Results
- Function Reference/get post type « WordPress Codex
Description. Retrieve the post type of the current post or of a given post. Usage. < ?php get_post_type( $post ) ?> Parameters. $post: (mixed) (optional) Post ...
codex.wordpress.org - get_post_types() - WordPress Codex
Description. Returns the registered post types as found in $wp_post_types. Usage. <?php get_post_types( $args, $output, $operator ) ?> Parameters ...
codex.wordpress.org - Wordpress Check for post type within loop using get_post_type
Jul 30, 2011 ... Adding this snippet within the loop of your wordpress theme will let you conditionally check for a specific post type. Just change the post type ...
wpsnipp.com - plugins - get_post_type on post.php - WordPress
Jan 27, 2012 ... The get_post_type($post->ID); is being ignored in the meta boxes on the post. php page, so instead of pulling data from the post with the name ...
wordpress.stackexchange.com
User discussions [ wordpress.org ]
- halleluuja on "get_post_type function only works on localhost"
- David Gwyer on "get_post_type function only works on localhost"
- halleluuja on "get_post_type function only works on localhost"
- kitsuneyo on "get_post_type returns 'post' for all post types in Twenty Eleven! Why?"
- Digital Raindrops on "get_post_type returns 'post' for all post types in Twenty Eleven! Why?"
- kitsuneyo on "get_post_type returns 'post' for all post types in Twenty Eleven! Why?"
- Digital Raindrops on "get_post_type returns 'post' for all post types in Twenty Eleven! Why?"
- alchymyth on "get_post_type returns 'post' for all post types in Twenty Eleven! Why?"
- Digital Raindrops on "get_post_type returns 'post' for all post types in Twenty Eleven! Why?"
- kitsuneyo on "get_post_type returns 'post' for all post types in Twenty Eleven! Why?"