• Resolved Andry

    (@blackstar1991)


    Hi, I got problem that look like in this topic. I need short slugs for my pages like –
    /pt/amp/ but when I pull set the values as in the picture

    I got problems, content has been hidden.

    If I press Polylang->Setting->Url modification->UNCHECK “The front page URL contains the language code instead of the page name or page ID”
    I would got right page but bad slug. Somthing like this /pt/portugal-bettilt/amp/
    How to fix this problem ? I need short slugs…

    • This topic was modified 2 years, 6 months ago by Andry.
    • This topic was modified 2 years, 6 months ago by Jan Dembowski.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @blackstar1991

    Thank you for contacting us, After some debugging, we found out that Polylang plugin needs to add an exception for amp query in their front page detection logic.

    the code can be found at wp-content/plugins/polylang/frontend/frontend-static-pages.php on line 169 check function is_front_page

    add the amp in the list

    before

    
    $query = array_diff( array_keys( $query->query ), array( 'preview', 'page', 'paged', 'cpage', 'orderby' ) );
    

    After adding amp

    
    $query = array_diff( array_keys( $query->query ), array( 'preview', 'page', 'paged', 'cpage', 'orderby', 'amp' ) );
    

    This should allow you to land on a short slug like /pt/amp/ on homepage.

    Hope this helps!

    Thread Starter Andry

    (@blackstar1991)

    Thanks for help

    Plugin Support Milind More

    (@milindmore22)

    @blackstar1991

    I have created a GitHub issue on polylang plugin for the same

    Hopefully, they will adopt the change and you won’t have to do it manually next time.

    I hope our suggestion is helpful, I’ll mark this as resolved Open a new support topic if you face further issues, also feel free to leave a plugin review, we would love to hear your feedback.

    Thread Starter Andry

    (@blackstar1991)

    Thanks again

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Short URL with Polylang’ is closed to new replies.