• Hi there,

    Using 1.1.4 on WP 3.6

    I’ve set up a custom post type with a slug of “artist” which handles multilingual content on its own via Advanced Custom Fields – I’ve not enabled polylang for it – and seems to work just fine, I pick up the active language and display data from a custom field accordingly when rendering the post.

    My only minor problem is that when accessing such a custom type, for example:

    http://localhost/en/artist/artist-name

    The locale is ommited and the url is redirected to

    http://localhost/artist/artist-name

    The rest of the elements of the page are properly translated since the cookie is set but is there a way I could get it to not redirect to a non-locale url?

    Naturally, if I enable polylang for the custom type and I set each post’s language they are only displayed if the user has selected that language, which is not the desired behaviour.

    http://wordpress.org/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    I believe that here the issue is not coming from Polylang. But you are probably annoyed by the WordPress canonical redirection which always redirect a page to its canonical url (to avoid duplicate content which is known to be bad for SEO). If you don’t like this and have some php skills, you may try playing with the filter ‘redirect_canonical’.

    Thread Starter moreyummystuff

    (@moreyummystuff)

    Ah, thanks for pointing me in the right direction. With some tweaking I got it working to how I expected it to work.

    Basically one can avoid this if they do not define the “rewrite” parameter for a custom type. Sadly as I had given it an ungainly name I needed to use the “rewrite” to have a “prettier” slug for the permalink so it needed some tinkering.

    Thanks again for your time.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Permalink rewriting for non-translated custom types’ is closed to new replies.