2020-05-02 / 4870阅 / 悠然
Checks if the current post is within any of the given categories.
The given categories are checked against the post’s categories’ term_ids, names and slugs. Categories given as integers will> Conditional Tags article in the Theme Developer Handbook.
Category ID, name or slug, or array of said.
Post to check instead of the current post. (since 2.7.0)
Default value: null
(bool) True if the current post is in any of the given categories.