Title: Custom post type link not work
Last modified: August 30, 2018

---

# Custom post type link not work

 *  [ceska91](https://wordpress.org/support/users/ceska91/)
 * (@ceska91)
 * [8 years ago](https://wordpress.org/support/topic/custom-post-type-link-not-work/)
 * **I’ve tried to use your filter snippet, like this:**
    function my_msls_options_get_permalink(
   $url, $language ) { if ( ‘en_GB’ == $language ) { $url = str_replace( ‘/sculture-
   mobili-design/’, ‘/sculptures-furniture-design/’, $url ); } elseif ( ‘it_IT’ 
   == $language ) { $url = str_replace( ‘/sculptures-furniture-design/’, ‘/sculture-
   mobili-design/’, $url ); } return $url; } add_filter( ‘msls_options_get_permalink’,‘
   my_msls_options_get_permalink’, 10, 2 );
 * The rewrite for the category still works, but the custom post type single page
   don’t change from EN to IT and viceversa, so the changing goes to 404 error.
   
   Obviuosly i’ve linked the languages in backend.
 * Any suggestions?
    -  This topic was modified 8 years ago by [ceska91](https://wordpress.org/support/users/ceska91/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-post-type-link-not-work%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [8 years ago](https://wordpress.org/support/topic/custom-post-type-link-not-work/#post-10644177)
 * This could be a permalink issue. Please, try to refresh these by visiting the
   permalinks settings in the WordPress admin.
 *  Thread Starter [ceska91](https://wordpress.org/support/users/ceska91/)
 * (@ceska91)
 * [8 years ago](https://wordpress.org/support/topic/custom-post-type-link-not-work/#post-10644254)
 * Hi Dennis, i’ve just re-tried but nothing change.
 * Any suggestions?
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [8 years ago](https://wordpress.org/support/topic/custom-post-type-link-not-work/#post-10648074)
 * What is the exact locale of the English website? Is it really en_GB?
 *  Thread Starter [ceska91](https://wordpress.org/support/users/ceska91/)
 * (@ceska91)
 * [8 years ago](https://wordpress.org/support/topic/custom-post-type-link-not-work/#post-10649580)
 * Exactly, the website is en_GB.
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [8 years ago](https://wordpress.org/support/topic/custom-post-type-link-not-work/#post-10652101)
 * OK, could you please debug what you get in the callback function? `error_log(
   $language . ': ' . $url );` or similar…
    -  This reply was modified 8 years ago by [Dennis Ploetner](https://wordpress.org/support/users/realloc/).

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

 The topic ‘Custom post type link not work’ 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/)
 * [MSLS](https://wordpress.org/support/topic-tag/msls/)

 * 5 replies
 * 2 participants
 * Last reply from: [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/custom-post-type-link-not-work/#post-10652101)
 * Status: not resolved