Okay
  Public Ticket #2866547
Compatibility with translations
Closed

Comments

  • RedMaestros started the conversation

    Hello,

    We have been experimenting some problems with the translation of or website: https://redmaestros.com

    We have the website in two languages (Spanish as main and English) with WPML but with another domain and when we open the sitemap that is generated for the English one, it changes the portfolio urls both in the Spanish sitemap and in the Spanish portfolio loop on the website. It automatically changes it to project (when it should stay in masters-cat) and therefore from that moment Google indexes urls that do not exist generating 404 errors in all entries.

    Thank you very much, we will be happy to provide further information if needed.


  •  895
    TheFox replied

    Hello RedMaestros, thanks for using our theme

    You might want to try to change the slug of the portfolio directly from your child theme.

    Try to add this in the child theme functions.php and then save the permalinks 


    function change_slug_of_post_type_portfolio() {
    $args = get_post_type_object("portfolio");
    $args->rewrite["slug"] = "masters-cat";
    register_post_type($args->name, $args);
    add_action('init', 'change_slug_of_post_type_portfolio', 20);

    Do not hesitate to contact us if you have more questions.

    Have a nice day!

    Best Regards.