Answers for "wordpress if is in categroy"

PHP
1

wordpress if is in categroy

// 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'.";
}
Posted by: Guest on May-18-2021

Browse Popular Code Answers by Language