in_category Wordpress function


Description:

Check if the current post in within any of the given categories.


Syntax:


Arguments:

(int|string|array) $category Category ID, name or slug, or array of said.
(int|object) $post Optional. Post to check instead of the current post. (since 2.7.0)


Return Type:

(bool) True if the current post is in any of the given categories.


Define At:

wp-includes/category-template.php


Wordpress Reference URL:

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


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