You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We received a support topic on the AMP support forum regarding polylang homepage, after debugging we found out that it can be easily fixed by adding a amp parameter in skip list.
Prerequisites
This is not a usage question (Those should be directed to the community supported forum, unless this is a question about Polylang Pro in which case you should use the helpdesk).
I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
The issue still exists against the latest master branch of Polylang and the latest WordPress version.
This bug happens with only Polylang plugin active
This bug happens with a default WordPress theme active
I can reproduce this bug consistently
Steps to reproduce the issue
Set Static Frontpage for WordPress site.
Add another language for front page.
Choose "The language is set from the directory name in pretty permalinks" & "The front page URL contains the language code instead of the page name or page id"
We received a support topic on the AMP support forum regarding polylang homepage, after debugging we found out that it can be easily fixed by adding a amp parameter in skip list.
Prerequisites
master
branch of Polylang and the latest WordPress version.Steps to reproduce the issue
Expected behavior and actual behavior
It should be https://example.com/pt/amp/
the front page detection logic should skip the page when the query contains an amp which can be fixed by adding amp in the list
wp-content/plugins/polylang/frontend/frontend-static-pages.php
in the functionis_front_page
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 the homepage.
The text was updated successfully, but these errors were encountered: