better-studio / better-amp

Full Google AMP support for WordPress with custom themes and customizations
https://betterstudio.com/wp-plugins/better-amp/
GNU General Public License v2.0
19 stars 19 forks source link

Bad URL for Desktop Version in sub-directory #74

Open mohidotpy opened 2 years ago

mohidotpy commented 2 years ago

Hello I have a WordPress installed on a subdirectory: https://example.com/wordpress/ and AMP URL format is End Point.

And the problem is in the paginated category pages, the subdirectory appears twice in the "View Desktop Version" URL.

for example: in this URL -> https://example.com/wordpress/home-goods/amp/page/2/, the "View Desktop Version" URL is https://example.com/wordpress/wordpress/category/home-goods/page/2/

mohidotpy commented 2 years ago

I think a good approach is adding a filter to the ur: Even if a problem appears in the future, users could resolve it with add a filter.

mohidotpy commented 2 years ago

I sent a pull request for this issue.

76