📜  wordpress if is in categroy - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:52.629000             🧑  作者: Mango

代码示例1
// Find out in Wordpress if a single/page is in a chosen category
if (in_category('fruit')) {
    echo "This single/page is in category 'fruit'.";
}