Hi. If you want to serve any template other than the singular as AMP (e.g. 404) then you need to switch to the new paired mode. Viewing non-singular templates in Classic mode is not supported.
Thread Starter
MaxRGB
(@maxrgb)
Thank you for your reply.
Tell me, please, how can I enable amp 404 page if I have custom 404.php file in my wordpress theme?
Thread Starter
MaxRGB
(@maxrgb)
version of amp plugin is 1.0.2
-
This reply was modified 6 years ago by
MaxRGB.
Thread Starter
MaxRGB
(@maxrgb)
Adding 404.php file to /themes/my-theme/amp/ folder doesn’t help if I use AMP-plugin in classic template mode.
At the same time, when I use AMP-plugin in other template modes (Native & Paired), there is no difference between pages of the site in basic and AMPlified view.
Classic mode does not support a custom 404.
Thread Starter
MaxRGB
(@maxrgb)
If 404.php file in my wordpress theme is default wordpress file (copied from twentynineteen theme), what file should I add to themes/mytheme/amp/
folder to see AMP version of 404 page?
@maxrgb Which AMP mode are you using? There are three options in the plugin settings: Classic, Paired, and Native.
As mentioned before, Classic mode does not support 404 AMP pages and there are currently no plans to change this.
Thread Starter
MaxRGB
(@maxrgb)
Thank you for your reply.
1. Tell me, please, how can I make my site working in paired mode? The problem is, that when I choose paired template mode in AMP-plugin settings all the pages are shown in my template view, but not in AMP-view.I mean pages my-site.com/article-url/
and my-site.com/article-url/amp/
look the same.
2. How can I make 404 page working in AMP version? 404.php page is copied from twentynineteen theme.
Thread Starter
MaxRGB
(@maxrgb)
Give me some answer please.
Thank you for your reply.
1. Tell me, please, how can I make my site working in paired mode? The problem is, that when I choose paired template mode in AMP-plugin settings all the pages are shown in my template view, but not in AMP-view.I mean pages my-site.com/article-url/ and my-site.com/article-url/amp/ look the same.
2. How can I make 404 page working in AMP version? 404.php page is copied from twentynineteen theme.
Please share the URL to an article that is available in AMP.
In paired mode, the AMP version of the URL ends in ?amp
not /amp/
. But you can see the AMP version by looking for the amphtml
link in the head
of a page.