• Resolved hoesmean

    (@hoesmean)


    When i want to see my dynamic listings as published, pending or editing url is translating.
    My url should be domain/my-account/my-listings/?status=publish
    but url is changing as
    domain/my-account/listelerim/?status=publish

    how to exclude this url translating or stop?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    You can exclude a page from being processed by TranslatePress using the Do not translate certain paths feature from TP Settings –> Advanced tab.

    Thread Starter hoesmean

    (@hoesmean)

    View post on imgur.com


    i did it but, it didnt work

    Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    This is not the way you should exclude it. You have to put only the slug in the exclude form, not the entire URL address. There is an example (under that form) of how you should exclude a path.

    Otherwise, try create a custom plugin with the following code where you should add your link:

      Add the following code to the end of it:

      /*
      * Don't add the language slug in a custom added link.
      * This does not prevent the page from showing the language switcher.
      * It also does not prevent the translation of the page.
      */
      
      add_filter( 'trp_force_custom_links', 'trpc_ignore_url', 10, 4 );
      function trpc_ignore_url( $translated_url, $url, $language, $a_href ){
      $link_to_ignore = "https://www.example.com/enchanced"; // url to ignore. 
      if ( strpos( $url, $link_to_ignore) !== false ){
      return $url;
      }
      return $translated_url;
      }

      Edit $link_to_ignore = “https://www.example.com/enchanced”; with your desired link address (without language slug in it).

      Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality.

    If the following code doesn’t bring you any results then please, delete the custom plugin.

    • This reply was modified 4 years, 1 month ago by Alex.
    Plugin Support Alex

    (@alexcozmoslabs)

    Since it’s has been more than 5 days since you received instructions about the opened topic, and you did not return with an update, we will mark this ticket as successfully resolved.
    If you have other questions regarding TranslatePress, we recommend you create another ticket.

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

The topic ‘Dynamic Url is translating’ is closed to new replies.