Hi!
I’m trying to add a custom sidebar to a custom taxonomy page. I made a custom post type called “Projects” and I made a taxonomy that only shows in Projects called “Project Areas.” For each unique Project Area, I would like to show a different sidebar. For instance - “Motor Skills Training” is a Project Area. I would like to use a particular sidebar for the archive page for Motor Skills Training.
I realized that custom taxonomies do not appear on the Sidebar menu where you can check off the place where you would like the sidebar to show. I only see the categories/tags taxonomies related to the native Blog page.
I added this code to my functions.php to try to make this happen:
add_filter( 'ups_sidebar', 'enforce_my_sidebar' );
function enforce_my_sidebar($sidebar){
if ( is_tax('motor-skills-training') ) return 'ups-sidebar-motor-skills-training';
return $sidebar;
}
Can you help me troubleshoot this? Thank you!!