Hook name
seopress_primary_category_list
Required version
7.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sp_primary_category_list($cats) { | |
//default | |
//$cats = get_categories(); | |
// global $typenow; | |
// global $post; | |
// if ('product' == $typenow) { | |
// $cats = get_the_terms($post_id, 'product_cat'); | |
// } | |
return $cats; | |
} | |
add_filter('seopress_primary_category_list', 'sp_primary_category_list'); |