Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #570738

    I created a custom post type and with it custom post taxonomies

    I created a template (taxonomy-team_group.php) How Can i load a custom sidebar with this php file is loaded?

    i already have this code which i’m using to load the correct sidebar on the CPT archives and singles, but need it to load for the group as well:

    add_filter( 'avf_custom_sidebar', 'enfold_customization_location_sidebar' );
    function enfold_customization_location_sidebar( $custom_sidebar ) {
    	if ( is_singular('wpsl_stores') ) { $custom_sidebar = 'Offices'; }
    	return $custom_sidebar;
    }
    #570740

    Nevermind I got it figured out. Had to change “is_singular” to “is_tax” and then the the taxonomy name:

    new code is here if anyone is curious:

    add_filter( 'avf_custom_sidebar', 'enfold_customization_specialties_sidebar' );
    function enfold_customization_specialties_sidebar( $custom_sidebar ) {
    	if ( is_tax('team_group') ) { $custom_sidebar = 'Doctors'; }
    	return $custom_sidebar;
    }
    #570892

    Hey!

    We are glad you got that short out!
    Btw, If you have a moment, I would very much appreciate if you could quickly rate the Enfold to themeforest, which wiII heIp us keep the deveIopment up!

    Please do not hesitate to contact us, if you do need anything else.

    Best regards,
    Basilis

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.