Which theme have you chosen for Reader mode?
If the only thing you want to do is make style changes, you can use the “Additional CSS” feature in the Customizer. When you click “Customize” in the admin bar when looking at an AMP page, you’ll open an AMP Customizer with settings specific to the Reader theme. The styles provided in the Additional CSS section will be limited to just the AMP version.
Otherwise, you’ll probably want to make a child theme of one of the core themes listed among the Reader themes. Then you can make the customizations to that child theme without modifying the code of the underlying theme, so you can avoid losing those changes when the core themes are updated.
Let’s say you created a child theme of twentytwenty
called veinteveinte
. If you wanted this theme to then be included in the list of selectable reader themes, you can use this plugin code:
<?php
/**
* Plugin Name: Add Veinte Veinte to list of AMP Reader Themes
*/
add_filter( 'amp_reader_themes', function ( $reader_themes ) {
array_unshift(
$reader_themes,
[
'name' => 'Veinte Veinte',
'slug' => 'veinteveinte',
// 'screenshot_url' => '...', // Optional mobile screenshot.
'homepage' => 'https://www.ads-software.com/themes/twentytwenty/',
'description' => 'Child theme of Twenty Twenty',
]
);
return $reader_themes;
} );
Note: We released beta3 on Friday: https://github.com/ampproject/amp-wp/releases/tag/2.0.0-beta3