Title: Custom post type error
Last modified: February 23, 2018

---

# Custom post type error

 *  Resolved [hcortes](https://wordpress.org/support/users/hcortes/)
 * (@hcortes)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/custom-post-type-error-6/)
 * Hi, I have a problem with custom posts translation.
 * When I connect the custom post between languages, instead of showing the translated
   slug, it shows this:
 * [https://www.eugin.fr/faq/recommandations-utiles-par-rapport-aux-traitements/](https://www.eugin.fr/faq/recommandations-utiles-par-rapport-aux-traitements/)
 * Link: <[https://www.eugin.es/?preguntas=recomendaciones-tratamientos&gt](https://www.eugin.es/?preguntas=recomendaciones-tratamientos&gt);;
   rel=”alternate”; hreflang=”es-ES”
    Link: <[https://ca.eugin.es/?preguntas=recomanacions&gt](https://ca.eugin.es/?preguntas=recomanacions&gt);;
   rel=”alternate”; hreflang=”ca-ES” Link: <[https://www.eugin.it/?preguntas=raccomandazioni&gt](https://www.eugin.it/?preguntas=raccomandazioni&gt);;
   rel=”alternate”; hreflang=”it-IT” Link: <[https://www.klinikeugin.de/?preguntas=empfehlungen&gt](https://www.klinikeugin.de/?preguntas=empfehlungen&gt);;
   rel=”alternate”; hreflang=”de-DE” Link: <[https://www.eugin.nl/?preguntas=aanbeveling&gt](https://www.eugin.nl/?preguntas=aanbeveling&gt);;
   rel=”alternate”; hreflang=”nl-NL” Link: <[https://www.eugin.co.uk/?preguntas=side-effects-risks-procedure&gt](https://www.eugin.co.uk/?preguntas=side-effects-risks-procedure&gt);;
   rel=”alternate”; hreflang=”en-GB” Link: <[https://www.eugin.fr/?preguntas=recommandations-utiles-par-rapport-aux-traitements&gt](https://www.eugin.fr/?preguntas=recommandations-utiles-par-rapport-aux-traitements&gt);;
   rel=”alternate”; hreflang=”fr-FR”
 * /?preguntas Which is in the main site language, instead of each site’s language:/
   preguntes/, /fragen/, /domande/ and so on.
 * I have tried changing the “use dynamic permalinks” but is showing only the current
   site slug language.
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-post-type-error-6%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/custom-post-type-error-6/#post-10031413)
 * Hi hcortes,
 * Can you explain the issue a bit more?
 * Thanks,
    Emili
 *  Thread Starter [hcortes](https://wordpress.org/support/users/hcortes/)
 * (@hcortes)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/custom-post-type-error-6/#post-10039008)
 * Hi,
 * The issue is that the hreflang links are poiting to a query url (/?preguntas=)
   instead of the translated slugs of the custom field.
 * Thanks.
 *  Plugin Support [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/custom-post-type-error-6/#post-10043623)
 * Hi hcortes,
 * You need to use **mlp_linked_element_link filter** to adjust MultilingualPress
   language links (in Menus and Language Switcher Widget), here is an example how
   to implement it:
    [https://wordpress.org/support/topic/problems-with-shop-permalinks/#post-9714350](https://wordpress.org/support/topic/problems-with-shop-permalinks/#post-9714350)
 * Notice **$fragments** array where we add key value pairs, keys are site IDs and
   values are arrays with the slugs.
 * In your case you need to adapt $fragment array values use your own site IDs and
   slugs.
 * Thanks,
    Emili
 *  Thread Starter [hcortes](https://wordpress.org/support/users/hcortes/)
 * (@hcortes)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/custom-post-type-error-6/#post-10048345)
 * Hi dinamiko,
 * Now is working, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom post type error’ is closed to new replies.

 * ![](https://ps.w.org/multilingual-press/assets/icon-256x256.png?rev=2188271)
 * [MultilingualPress](https://wordpress.org/plugins/multilingual-press/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multilingual-press/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multilingual-press/)
 * [Active Topics](https://wordpress.org/support/plugin/multilingual-press/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multilingual-press/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multilingual-press/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [hcortes](https://wordpress.org/support/users/hcortes/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/custom-post-type-error-6/#post-10048345)
 * Status: resolved