Support » Plugin: Permalinks Customizer » Compatibility with polylang

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sami Ahmed Siddiqui


    Hi firetix, Thanks for using this plugin 🙂 and sorry for facing the difficulty in it 🙁 .

    If you don’t mind so can you tell me which plugin version you are using?

    And have you checked the plugins settings page? If yes, so please share a screen shot of the plugin settings. If No, so, i recommend you to have a try of the plugin settings page first.


    Hi, Sami .

    Thank you for your reply.
    I managed to get it working by modifying the
    permalinks_customizer_post_link() function as follows:

    The thing is that Polylang is adding the language prefix to the url. this is why we get the language code two times.

    function permalinks_customizer_post_link($permalink, $post) {
       $permalinks_customizer = get_post_meta( $post->ID, 'permalink_customizer', true );
       if ( $permalinks_customizer ) {
           $str = "/".$permalinks_customizer;
          return home_url($str,'relative'); // This builds a url relative to "languagecode/my-custom-link" and allow polylang to add the language prefix correctly
       return $permalink;

    I no longer get the 404.

    Another issue that i’m getting is:
    When i call get_permalink() in my templates or custom plugins. The link that is display is the default one, not my customised one.

    Any idea on that part ?

    When you have some free time, it would be nice to have some comments in your plugin code so that its more readable 🙂

    Thanks again.

    Plugin Author Sami Ahmed Siddiqui


    Good to know that you have resolved the issue by your own self.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Compatibility with polylang’ is closed to new replies.