• ceska91

    (@ceska91)


    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.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Dennis Ploetner

    (@realloc)

    This could be a permalink issue. Please, try to refresh these by visiting the permalinks settings in the WordPress admin.

    Thread Starter ceska91

    (@ceska91)

    Hi Dennis, i’ve just re-tried but nothing change.

    Any suggestions?

    Plugin Author Dennis Ploetner

    (@realloc)

    What is the exact locale of the English website? Is it really en_GB?

    Thread Starter ceska91

    (@ceska91)

    Exactly, the website is en_GB.

    Plugin Author Dennis Ploetner

    (@realloc)

    OK, could you please debug what you get in the callback function? error_log( $language . ': ' . $url ); or similar…

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

The topic ‘Custom post type link not work’ is closed to new replies.