Support » Plugin: AMP » Native AMP in Version 0.7

  • Resolved narinder912

    (@narinder912)


    Please provide a detailed easy manual for activation of native AMP. I would like to make my entire site (run on TagDiv Newsmag Theme) AMP. But not sure how to do it (where to insert the code in the functions.php. Also what happens to the AdSense units in the desktop version. How to make them AMP compatible?

    Another question, this plugin, the new version, does not work when Yoast SEO Glue plugin is installed. Is that not needed now or the Glue needs an update too?

    Best Regards
    Narinder

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    @narinder912 You can find documentation for native AMP here: https://github.com/Automattic/amp-wp/wiki/Adding-Theme-Support

    Note that the native AMP features in 0.7 are really best suited for theme authors that are creating new themes from scratch to be AMP-compatible. Specifically in regards to the size of the CSS. In the 1.0 release the plugin will be much better suited to adding AMP support to existing themes since it will have the ability to strip out excessive CSS (anything over 50KB) and also

    AdSense units will get removed in Native AMP. You’ll have to use <amp-ad> tags instead. Work is underway to try to detect common scripts, such as ad units, and automatically convert them to the AMP equivalents. But this is not part of 0.7. You can follow work on that here: https://github.com/Automattic/amp-wp/issues/1032

    I do not know the status of Yoast SEO Glue and AMP v0.7. Since it specifically would be targeting the legacy post templates in the AMP plugin, it’s likely that it won’t have any effect in a Native AMP site which uses normal WordPress templates and hooks. This needs testing.

    Udegbunam Chukwudi

    (@strictlyonlinebiz)

    Please does activating Native AMP on my mobile theme’s functions.php mean that all mobile visitors will be automatically redirected to the AMP version of the page?

    Thanks

    Thread Starter narinder912

    (@narinder912)

    Hi @strictlyonlinebiz,

    There is another AMP plugin – ‘AMP for WP’ that has a one click option to redirect all mobile visitors to AMP. ‘AMP for WP’ uses this plugin ‘AMP for WordPress’ as a base, and builds features on it. I am currently using that one but not using this redirect function. I am already using ‘Really Simple SSL’ to redirect everyone to https. Not sure if adding another redirect for sending all mobile visitors to AMP will create any problem or not.

    Plugin Author Weston Ruter

    (@westonruter)

    @strictlyonlinebiz No, Native AMP means that the mobile version of the site is exactly the same as the desktop version. The same theme templates are used in both desktop and mobile, both in AMP.

    Udegbunam Chukwudi

    (@strictlyonlinebiz)

    Thanks a lot @narinder912 and @westonruter for the feedback.

    So if I were to use the same template for AMP and Desktop, I simply add the code below to functions.php and that’s it?

    add_theme_support( 'amp', array(
            'comments_live_list' => true // example value
    ) );
    Plugin Author Weston Ruter

    (@westonruter)

    @strictlyonlinebiz Yes, though you should only add comments_live_list if you actually have added the amp-live-list to your comments.php template. Also, as of 0.7 the amp theme support is really geared toward themes that have been written to be AMP-compatible from the start in terms of the amount of CSS used and whether scripts are required. The upcoming v1.0 release will be much better to handle making existing themes work in AMP. You’d probably be better off first theme support using the paired mode as described in https://github.com/Automattic/amp-wp/wiki/Adding-Theme-Support#paired-mode

    Udegbunam Chukwudi

    (@strictlyonlinebiz)

    Thanks once again kind sir

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Native AMP in Version 0.7’ is closed to new replies.