Skip Navigation

[Résolu] use javascript to link taxonomy to page

This support ticket is created Il y a 3 années. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Marqué : 

This topic contains 18 réponses, has 2 voix.

Last updated by davidm-13 Il y a 3 années.

Assisted by: Jamal.

Auteur
Publications
#2011095

My issue is resolved

#2011193

Just wanted to add my update for multiple taxonomies

function redirect_my_custom_tax_archive_to_post() {

    if (is_tax('english-name') || is_tax('hebrew-name') ||
	   is_tax('arabic-name') || is_tax('phonetic-hebrew-name') || is_tax('phonetic-arabic-name') ) {

        global $post;

        wp_safe_redirect(get_permalink($post->ID));

        die;

    }

}

add_action('template_redirect','redirect_my_custom_tax_archive_to_post');
#2011867

Jamal
Supporter

Languages: Anglais (English ) Français (Français )

Timezone: Africa/Casablanca (GMT+01:00)

That's right, the code will be applied in the terms of all the taxonomies you added('english-name', 'hebrew-name', 'arabic-name', 'phonetic-hebrew-name', 'phonetic-arabic-name')

#2013097

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.