Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 11 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
July 12, 2023 at 3:13 pm #14026385

alexE-10

We have a custom taxonomy called location-category, this is working fine in English

hidden link

When we add dutch language the taxonomy info isn't coming through

hidden link

The code we are using is

$terms = get_terms([
'taxonomy' => 'location-category',
'hide_empty' => false,
'meta_key' => 'order',
'orderby' => 'meta_value',
'order' => 'ASC'
]);

but for dutch it is return an empty array.

i have attached an image showing the set-up in the admin

dutch.jpg
July 13, 2023 at 8:20 am #14029769

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

Please see this thread https://wpml.org/forums/topic/how-to-correlate-translated-and-base-language-terms/#post-6272817 for details on how you can set proper language before requesting the terms.

Also see WPML Hooks Reference at https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/ for details. In this reference you may find several useful hooks and examples about how to use them.

Lastly, please note that custom work is out of scope of this forum, should you require more help, please see https://wpml.org/contractors/.

Regards.