Hello,
I've created a template through Toolset to show each Arbitrators' bio. See the following example: versteckter Link
When creating the Template, I've chosen to display their Specialties in a box on the left. However, it's not showing the Parent taxonomies for Specialties but rather display all Specialties (parent and sub taxonomies mixed together and separated by a coma).
How can I change this so it displays the Specialties as follow:
Commercial
> Collection, Debtors
> Contracts
Employment
>Workplace Disputes
>Wrongful/Constructive Dismissal
Thank you for your help!

Minesh
Unterstützer
Sprachen:
Englisch (English )
Zeitzone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Can you please tell me how exactly you are displaying those specialities? Do you want to display only parent specialities terms or something else?
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Ok - so on single post content tempalte you want to display the terms attached to posts in hierarchical manner.
What if you try to add the followig shortcode to "Custom Code" section offered by Toolset:
function func_list_hierarchical_terms_single($atts) {
global $post;
$taxonomy = $atts['taxonomy'];
$separator = $atts['separator'];
$terms = wp_get_object_terms( $post->ID, $taxonomy, array( "fields" => "ids" ) );
if( $terms ) {
$terms = trim( implode( ',', (array) $terms ), ' ,' );
return wp_list_categories( 'title_li=&taxonomy=' . $taxonomy . '&include=' . $terms."&hierarchical=1"."&separator=".$separator."&echo=0&style=list");
}
}
add_shortcode('show_tax_terms_hierarchical', 'func_list_hierarchical_terms_single');
And you can call the above shortcode as given under by adding shortcode block to your content template:
=> versteckter Link
[show_tax_terms_hierarchical taxonomy="specialty" separator=""]
More info:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/
Thanks for your prompt response!
I've added the Custom code and the shortcode but it's not working.
Can you just go to Toolset => Settings => Custom Code and activate the code snippet you added and check if that help you to resolve your issue.