Hi,
I think I found a bug in the URL of translated CPT categories when:
– A CPT is set with “disable physical location”
– Location filter is on
– Foreign language (WPML) is displayed
The category widget works fine with all CPT and in both languages, or when no location filter is on… except for one CPT that has no location AND only in the translated French version AND only when location filter is on.
I was checking general_functions.php at line 2910:
post_type has a few issues:
– it does not contain the root part of the URL
– it is missing the language /fr/ part
– it has weird combination of the English and the French slug
– it contains geographical information when the location filter is set
For now I fixed it by hardcoding a line between 2910 and 2911:
if ($post_type == 'gd_online_shop' && ICL_LANGUAGE_CODE == 'fr' ) {$term_link = "http://my.domain.com/fr/shops-en-ligne/".$cat->slug;}
Of course I have double checked WPML & in the SQL, my slugs are translated correctly.
By the way, I noticed the same issue with the URL of the categories that I added to the menu of my theme. Will hardcode those as well.
Would you have a cleaner (not hardcoding the domain) fix for me to apply somewhere until the next update?
Best,
Marc