Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter stratboy

    (@stratboy)

    Hi. I noticed this: in class PLL_Frontend >

    public function init() {
       $this->links = new PLL_Frontend_Links($this->links_model);
    
       $this->choose_lang = $this->options['force_lang'] && get_option('permalink_structure') ?
       new PLL_Choose_Lang_Url($this->links) :
       $this->choose_lang = new PLL_Choose_Lang_Content($this->links);
    }

    If I comment out the PLL_Choose_Lang_Content initialization, I stop the auto-redirect.

    2 more questions then:

    – does it break something relevant? I mean: is it still fine for backoffice? Can I still manually query what I need?

    – to stop auto redirect, is there any other better way that doesn’t imply core code hacking?

    Thank you, regards

    Plugin Author Chouby

    (@chouby)

    – have polylang do nothing in frontend: I’ll manually query translations by myself.

    Obviously, that’s not something I forecasted ??

    I mean: is it still fine for backoffice?

    Yes. Frontend and backoffice are totally separated.

    Can I still manually query what I need?

    Not sure. It depends on how you use WordPress on frontend.

    – to stop auto redirect, is there any other better way that doesn’t imply core code hacking?

    perhaps https://polylang.wordpress.com/documentation/documentation-for-developers/filter-reference/#pll_redirect_home

    Thread Starter stratboy

    (@stratboy)

    perhaps https://polylang.wordpress.com/documentation/documentation-for-developers/filter-reference/#pll_redirect_home

    Yesss!!! That filter lets me solve my problem without hacking the core! Thank you! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Polylang changes urls: how to avoid/disable automatic redirect?’ is closed to new replies.