I have created a set of custom taxonomy and term for Woocommerce Product Post Type and I would like to apply Conditional Tags for some of the functions I am hooking into the Custom term Archive page.
The code below is the function I want to add to the Product Term Archive pages and it works as expected
Now I am trying to add conditional tags to the function so it only works on my custom terms created by toolset and not my other Woocommerce Archive pages.
I have tried the conditional tag is_tax() as below but it doesn't seem to work.
if ( is_tax() ) {
add_action( 'woocommerce_archive_description', 'coffee_archive_description', 15 );
function coffee_archive_description() {
echo do_shortcode('[elementor-template id="11881"]');
}
}
How is Custom Taxonomies Toolset registered in WordPress/Woocommerce?
How can I set a conditional tag, if it is possible?
Hello. Thank you for contacting the Toolset support.
Well - could you please tell me which taxonomy you created and for which terms you would like to display the things conditionally.
Also, where and how you added the code you shared? have you added it to functions.php fiel - if yes, I need to check how you added as it should be added to specific hook.
If you can share all above required information with access would be great to help you further.
*** 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.