• Hi

    I am a plugin developer and I am using this plugin to make it multilingual.

    Because the plugin is getting quite complex I need quite specific features usually.
    Right now I am strugling, because get_permalink() does not add the language code. Because of that, there seems to be a redirect in background which prevents me of posting POST data to dynamically generated URL.

    Does Polylang support any function to return the correct permalink?
    Constructing the url with pll_home_url() is out of question, as I need to support any kind of permalinks.

    Thank you for your answer,
    Sonicelo

    https://ww.wp.xz.cn/plugins/polylang/

Viewing 1 replies (of 1 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    get_permalink() does not add the language code

    get_permalink() does not add the language code when it is not necessary i.e when the language is set from the content in Polylang settings. When the language is set from the directory name, then the language code is added.

Viewing 1 replies (of 1 total)

The topic ‘Get correct permalink’ is closed to new replies.