Skip Navigation

[Résolu] Has term doesn't work in the translated pages

This support ticket is created Il y a 7 années et 2 mois. 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Marqué : 

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

Last updated by SilviaC4418 Il y a 7 années et 2 mois.

Assisted by: Beda.

Auteur
Publications
#490794

Hi,
a while ago, Beda (Toolset support) helped me to construct this function.

on my website this function was working until i tested the same function with the french url (generated by WPML)

function foobar_func( $atts ){
global $wp;
$current_url = home_url(add_query_arg(array(),$wp->request));
return $current_url;
}
add_shortcode( 'foobar', 'foobar_func' );

> I added [foobar] in Third-party shortcode arguments

 [wpv-conditional if="( '[foobar]' eq '<em><u>hidden link</u></em>' )"]TEST[/wpv-conditional] 

but when i wanted to use the same function with the french url, evrything diseapeard of the website

 [wpv-conditional if="( '[foobar]' eq '<em><u>hidden link</u></em>' )"]TEST[/wpv-conditional] 

> hidden link

it supposed to show up Above the search bar (in the sidebar) but the text "TEST" does'nt show up

could you help me to fix this

#490907

I cannot assist this.

We do provide Custom Code help sometimes, small snippets and tips and tricks, but we cannot start to debug them or expand them, especially when it is not related to Toolset or does not use Toolset features.

What you can try to do is insert just "Foobar" ShortCode, and see what it outputs on each language.
Then you can either adapt the condition or the ShortCode, in case it's conflicting with translated content.

But I suspect the conditional is just not comparing correct values.

So, after seeing what exactly "Foobar" outputs on your French URL, you can compare to this exact value, and then it should work.

#491280

Thanks for your help

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