Use template for posts with a particular category grandparent
Let me update your code 🙂 You don’t need to select grandparent category for your post. First we need to get grandparent category name. Here is the function; function get_grandparents_category_salgur( $id) { $parent = get_term( $id, ‘category’ ); if ( is_wp_error( $parent ) ) return $parent; if ( $parent->parent && ( $parent->parent != $parent->term_id ) … Read more