I need to if else the following add_filters in my functions.php or find maybe someone can suggest a different way of coding this up.
if ( is_category( array(2,3) ) ) {
add_filter('category_description', 'sort_category_description'); }
elseif ( is_category( array(7) ) ) {add_filter('category_description', 'dgfmWeeklyChallengeUserSubmit');}
else { add_filter('category_description', 'sort_category_description'); }
I only want the add_filter to run if it matches the is_category array.
Any ideas would be great. Thank you.
Aucun commentaire:
Enregistrer un commentaire