and yet you give it a 5 star?
The way I did it with is ACF and then hide the old stuff we don’t use, without touching the plugins.
It should be fine, however, Recommend you move that function to theme > functions.php, so future plugin patch won’t erase it.
Thread Starter
zyend
(@zyend)
Thanks after final changes, the code to grab subcategory of a post as follows:
foreach((get_the_category($post->ID)) as $category) {
if ($category->category_parent == 4 ) {
$subcat=$category->cat_ID;
}
};