Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Cookie/Jar.php on line 63

Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Cookie/Jar.php on line 73

Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Cookie/Jar.php on line 89

Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Cookie/Jar.php on line 102

Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Cookie/Jar.php on line 111

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/justin/public_html/bootplate/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91
Accelerated Mobile Pages (AMP) | Bootplate

Accelerated Mobile Pages (AMP)

Bootplate is all about speed so we can’t ignore projects like Google’s Accelerated Mobile Pages project (AMP). This pre-tested plugin enables Accelerated Mobile Pages (AMP) on your WordPress site and it’s already been tested and (slightly) customized for use with Bootplate.

What is AMP?

AMP Pages in Google Search Results AMP Pages in Search Results

Google’s Accelerated Mobile Pages Project (or “AMP” for short) is an open source initiative that came out of discussions between publishers and technology companies about the need to improve the entire mobile content ecosystem for everyone – publishers, consumer platforms, creators, and users.

Accelerated Mobile Pages are just like any other HTML page, but with a limited set of allowed technical functionality that is defined and governed by the open source AMP spec. Just like all web pages, Accelerated Mobile Pages will load in any modern browser or app webview.

AMP files take advantage of various technical and architectural approaches that prioritize speed to provide a faster experience for users. The goal is not to homogenize how content looks and feels, but instead to build a more common technical core between pages that speeds up load times significantly.

By using the AMP format, content producers are making the content in AMP files available to be crawled, indexed & displayed (subject to the robots exclusion protocol) and cached by third parties.

Perhaps more importantly, websites taking advantage of the AMP HTML format can be included in Google’s carousel with an “AMP” designation.

This is meant to encourage publishers to adopt the format and for users to click the card because they know the page will open almost instantly.

Speed matters.  It matters more now than ever.

AMP HTML (the easy way)

bootplate-amp-validationThanks to the team at Automattic, there’s a free WordPress plugin called AMP which handles all this complicated AMP HTML conversion stuff for you.  All you have to do is install and activate the plugin.  That’s it. Seriously.

Here’s an example with and without AMP enabled.

There’s a screenshot to the right just to show you that it’s 100% AMP valid according to Chrome Developer Tools.

Long live the mobile web!

Bootplate + AMP

The AMP plugin currently only supports the POST type (no pages) as that’s in the spirit of the project’s initiative.  So the plugin only works on Posts.  That’s no big deal.

Bootplate has a function built-in to detect that you’ve installed and activated the plugin.  Once detected, it adds a filter with a little more Bootplate-esque CSS styling.

To make your own styling, you can overwrite the function by adding something like this to your child theme’s functions.php file.

The theme’s version of the file is wrapped in a if(!function_exists()) statement.  That’s PHP nerd-speak for you’re welcome to overwrite it by creating a function with the same name and it’ll simply skip the original function (yours already exists).

More information about the amp_post_template_css action inside of the AMP plugin is available on the plugin’s GitHub README.