@jasondavis You may be using a theme which already has amp support defined, which can result in that error. These themes work best in transitional or standard mode, as they use your themes styling and layout. If you are having issues with those modes I would suggest disabling some of the other plugins you have active temporarily, they could be the cause of the timing out problem.
If you want to share your site we can take a look. You can also look in your themes functions.php file for any add_theme_support reference.
You will find more information on reader mode customisation here, and how it works with themes.
@jamesosborne Thank you for the response. The theme is a heavily modified child theme of twentyseventeen and includes visual composer. My hope was to maintain a separate AMP template stored inside of the child theme.
I setup a folder ‘amp-template’ and pointed to it using add_theme_support. The documentation says that this should be done with the Transitional method.
Most of the pages work in Reader mode, except the homepage. None of the pages work in transitional, even with the plugin theme files copied over.
You can see the site here: https://texastoilets.wpengine.com/
The intention is to make custom amp landing pages for different marketing campaigns, so having a separate template and separate pages is not an issue.
@jasonhdavis In that case using amp in transitional mode using custom templates may be your best approach. You can create your own templates using your Twenty Seventeen theme for use in amp only. As an example, from within your amp-template folder create a home.php file. You can copy the content from the Twenty Seventeens front-page.php. Modify to suit your needs and then view your homepage in amp.
Using reader mode there is no home template, so unless your homepage is set to display a single page amp is not supported. The templates bundled with the plugin are not intended to be copied for use with amp theme support, but as you are using Twenty Seventeen you can copy whatever templates you like from that theme to use in AMP and modify to suit your landing pages or custom post types.
@jamesosborne Yes, I understand. So you’re saying that duplicating the twentysixteen files inside of the amp-template folder will be sufficient to act as a boilerplate theme?
Again, please understand that I am not trying to build piecemeal, I want a boilerplate theme. Something that’s complete that I can then modify. So I will duplicate the entire twentysixteen theme, including static assets, and that will work?
Besides front-page.php being changed to home.php, are there other files that will need filename changes?
Also, you believe copying over the entire theme will resolve the timeout error that I am currently experiencing? Or would this be related to an installed plugin, such as Visual Composer?
@jasonhdavis Apologies for the delay. You can start with index.php from your theme, copied to the amp-templates folder within your child theme, and making changes from there. A function like the below added to your themes functions.php should work:
add_theme_support( 'amp', array(
'paired' => true,
'template_dir' => 'amp-templates',
'templates_supported' => 'all',
) );
In relation to your timing out error it could be down to your page builder, or other plugin as you mention. Many page builders are not AMP compatible.