Support » Plugin: Multisite Language Switcher » Custom Post Types and MLS

  • Resolved MattV


    Thanks for this great plugin!

    Quick question: what´s the best way to localize custom post types?

    At the moment I have set up two different post types: activities (en_US) and actividades (es_ES).

    This results in this permalink structure:


    I´d like to connect the English post type to the Spanish post type.

    I´ve used your permalink filter in the functions.php file of my Spanish site and updated permalinks settings. However MLS doesn´t seem to find a translatable post yet.

    I´ll look into this further, just wondering if you could tell me if I´m on the right track or if I should take a different approach.

    Here´s the filter I used:

    function my_msls_options_get_permalink( $url, $language ) {
        if ( 'es_ES' == $language ) {
            $url = str_replace( '/activities/', '/actividades/', $url );
        return $url;
    add_filter( 'msls_options_get_permalink', 'my_msls_options_get_permalink', 10, 2 );

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Types and MLS’ is closed to new replies.