Title: Map post from different post type name
Last modified: August 31, 2016

---

# Map post from different post type name

 *  Resolved [Suika](https://wordpress.org/support/users/suikalum/)
 * (@suikalum)
 * [10 years ago](https://wordpress.org/support/topic/map-post-from-different-post-type-name/)
 * Hi!
 * I have two sites at the moment – US and UK.
 * They have custom post types named “sanitizers” and “sanitisers” respectively 
   and because they have different custom post type names, they can’t be connected
   to each other.
 * Does anyone know a workaround for this? I have two more on the way which are 
   ES and DE sites so this is really a problem.
 * Thanks!
 * [https://wordpress.org/plugins/multisite-language-switcher/](https://wordpress.org/plugins/multisite-language-switcher/)

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

 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [10 years ago](https://wordpress.org/support/topic/map-post-from-different-post-type-name/#post-7454477)
 * Hi,
 * you could use the [‘gettext’-filter](https://core.trac.wordpress.org/browser/tags/4.5.2/src/wp-includes/l10n.php#L105)–
   if you use the standard WordPress translation functions for the translation of
   the slug – in combination with a hook called ‘msls_options_get_permalink’ which
   comes with the Multisite Language Switcher. Or that filter alone like [here](https://gist.github.com/lloc/5f922fc770d818365992#file-msls_options_get_permalink-php)
   and [here](https://wordpress.org/support/topic/switcher-only-works-in-one-direction-slugs-no-longer-being-translated?replies=2).
 *  Thread Starter [Suika](https://wordpress.org/support/users/suikalum/)
 * (@suikalum)
 * [10 years ago](https://wordpress.org/support/topic/map-post-from-different-post-type-name/#post-7454588)
 * I tried to use this:
 *     ```
       function my_msls_options_get_permalink( $url, $language ) {
           if ( 'en_GB' == $language ) {
               $url = str_replace( '/sanitizers/', '/sanitisers/', $url );
           }
           return $url;
       }
       add_filter( 'msls_options_get_permalink', 'my_msls_options_get_permalink', 10, 2 );
       ```
   
 * But it’s still not showing in the Multisite Language Switcher dropdown on the
   post. I don’t use any translator. I just cloned my US site to make a UK site 
   and renamed the custom post type (I use CPT UI) to Sanitiser.
 * Or should it still be named as “Sanitizers” on the UK site and this code would
   just replace its values on the permalinks?
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [10 years ago](https://wordpress.org/support/topic/map-post-from-different-post-type-name/#post-7454620)
 * How did you register the custom post type? It would work if the post type had
   the same name but a translated slug. Please provide more information.
 *  Thread Starter [Suika](https://wordpress.org/support/users/suikalum/)
 * (@suikalum)
 * [10 years ago](https://wordpress.org/support/topic/map-post-from-different-post-type-name/#post-7454633)
 * Hello!
 * I use the plugin CPT UI / Custom Post Type UI to create and rename my custom 
   posts.
 * This was confusing at first when you said it should have the same “name” but 
   translated “slug” because in the plugin I mentioned, the general inputs available
   are called “name/slug” and “labels” but when I checked the advanced setting below,
   it has an option to set a “Custom Rewrite Slug” which is where the translated
   slug should go to.
 * Additional reference where I got the idea is the parameters for [manually registering post types](http://codex.wordpress.org/Function_Reference/register_post_type#Parameters)
   under the `rewrite` args.
 * Not sure if the filters you mentioned are necessary too this way because I’ve
   removed them but the urls are fine. Will try for the other languages which have
   more complex translation and I’ll let you know.
 * Hope this helps someone too.
 * Thanks, Dennis!
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [10 years ago](https://wordpress.org/support/topic/map-post-from-different-post-type-name/#post-7454645)
 * OK, thanks for sharing this info!
 *  Thread Starter [Suika](https://wordpress.org/support/users/suikalum/)
 * (@suikalum)
 * [10 years ago](https://wordpress.org/support/topic/map-post-from-different-post-type-name/#post-7454648)
 * Just to confirm, I tried this for my other sites (ES and DE) and they work fine
   without the filters. Just change the Labels and Custom Rewrite Slug on CPT UI
   and you’re good to go. Take note, don’t change the slug!
 * Cheers!

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

The topic ‘Map post from different post type name’ is closed to new replies.

 * ![](https://ps.w.org/multisite-language-switcher/assets/icon-256x256.png?rev=
   2793358)
 * [Multisite Language Switcher](https://wordpress.org/plugins/multisite-language-switcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multisite-language-switcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multisite-language-switcher/)
 * [Active Topics](https://wordpress.org/support/plugin/multisite-language-switcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multisite-language-switcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multisite-language-switcher/reviews/)

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * 6 replies
 * 2 participants
 * Last reply from: [Suika](https://wordpress.org/support/users/suikalum/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/map-post-from-different-post-type-name/#post-7454648)
 * Status: resolved