How to add a body class based on a custom taxonomy term
What is the job of $section_name? Also you must get an return; you if statement kill the default return. It is important, if your if statement fails. maybe this works, but not tested, write from scratch. add_filter( ‘body_class’, ‘section_id_class’ ); // add classes to body based on custom taxonomy (‘sections’) // examples: section-about-us, section-start, section-nyc … Read more