AMP for WordPress

Açıklama

This plugin adds support for the Accelerated Mobile Pages (AMP) Project, which is an open source initiative that aims to provide mobile optimized content that can load instantly everywhere.

With the plugin active, all posts on your site will have dynamically generated AMP-compatible versions, accessible by appending /amp/ to the end your post URLs. For example, if your post URL is http://example.com/2016/01/01/amp-on/, you can access the AMP version at http://example.com/2016/01/01/amp-on/amp/. If you do not have pretty permalinks enabled, you can do the same thing by appending ?amp=1, i.e. http://example.com/?p=123&amp=1

Note #1: homepage, the blog index, and archives are not currently supported.

Note #2: this plugin only creates AMP content but does not automatically display it to your users when they visit from a mobile device. That is handled by AMP consumers such as Google Search. For more details, see the AMP Project FAQ.

Follow along with or contribute to the development of this plugin on GitHub. For more information on the plugin, how the plugin works and how to configure and extend it, please see the project wiki.

Ekran Görüntüleri

  • Post rendered in AMP template.
  • Customizing appearance of AMP template.
  • Article from New York Post showing customized AMP template.
  • Article from TNW showing customized AMP template.
  • Article from Halfbrick showing customized AMP template.

Yükleme

  1. Upload the folder to the /wp-content/plugins/ directory
  2. Bu eklentiyi “Eklentiler” menüsünden etkinleştirin
  3. You may need to refresh your permalinks by going to Settings > Permalinks and tapping the Save button.

SSS

Installation Instructions
  1. Upload the folder to the /wp-content/plugins/ directory
  2. Bu eklentiyi “Eklentiler” menüsünden etkinleştirin
  3. You may need to refresh your permalinks by going to Settings > Permalinks and tapping the Save button.

İncelemeler

ACF Support

If this any solutions for acf fields? We have some posts in WP with acf fields. But in the amp preview is nothing visible. Any suggestions?

Does its job

It does it job flawlessly. Loads AMP superfast because there are no extras to add. I am able to do some customization after adding the ‘Glue for Yoast SEO & AMP’ plugin.

To nitpick, there is no logo in the header but just my site name in text. But this header design is acceptable out of the box. Its better than the bad logo presentation I was getting from the tagdiv AMP plugin. I have also managed to add Google AdSense by inserting the ad code in the ‘single.php’ and the linked script code in ‘html-start.php’. It is also possible to add some text and links in the footer (footer.php). All .php files referred to above are the plugin’s own files and can be accessed by going to Plugin Editor.

not working with my theme, reverse effect

Hi, I tried to your plugin. For me it didn’t work at all, my theme is 100% responsive and the presentation of my pages actually deteriorated as the plugin didn’t seem to recognize this… Google scores went down instead of up….

Very basic. Missing tons of features

There are no navigations menus. No option to make the site looks really like the responsive version of the blog. Its a limited plugin and its sad that this is what Automatic thought that would be satisfying for the users.

They way this plugin works, you will loose leads and usage rates of the site, like pages per session, cause the AMP result is flat, and without any navigation items, for the users to use your site, and discover content

Not showing post content, only header and footer

hi
There are some issues with APM plugin. In my blog content of some blog post is not visible only heading is shown in AMP version. Blog post is

http://healthdose.in/fitness/top-10-fitness-band-under-5000-in-2018/amp

The other issue is Subheading are not showing in AMP version.
http://healthdose.in/fitness/best-blender-shaker-bottle-online/amp

Please resolve these issues.

138 incelemeyi oku

Katkıda Bulunanlar ve Geliştiriciler

“AMP for WordPress” açık kaynaklı yazılımdır. Aşağıdaki kişiler bu eklentiye katkıda bulunmuşlardır.

Katkıda bulunanlar

“AMP for WordPress” 14 dile çevrildi. Katkıda bulundukları için çevirmenlere teşekkürler.

“AMP for WordPress” eklentisini dilinize çevirin.

Geliştirmeyle ilgilenir misiniz?

Kodu görüntüle, SVN deposuna göz at veya RSS ile geliştirme günlüğüne abone ol.

Değişiklik Kaydı

0.6.2 (2018-02-12)

  • Reduce frequency of flushing rewrite rules and harden, use escaped translation functions, and make minor changes to improve logic/style. See #953. Props philipjohn, westonruter.
  • Fix AMP preview icon in Firefox. See #920. Props zigasancin.

0.6.1 (2018-02-09)

Bump version to re-release to ensure temporarily-broken 0.6.0 ZIP build is permanently fixed, without requiring a site to re-install the plugin.

0.6.0 (2018-01-23)

  • Add support for the “page” post type. A new page.php is introduced with template parts factored out (html-start.php, header.php, footer.php, html-end.php) and re-used from single.php. Note that AMP URLs will end in ?amp instead of /amp/. See #825. Props technosailor, ThierryA, westonruter.
  • Add AMP post preview button alongside non-AMP preview button. See #813. Props ThierryA, westonruter.
  • Add ability to disable AMP on a per-post basis via toggle in publish metabox. See #813. Props ThierryA, westonruter.
  • Add AMP settings admin screen for managing which post types have AMP support, eliminating the requirement to add add_post_type_support() calls in theme or plugin. See #811. Props ThierryA, westonruter.
  • Add generator meta tag for AMP. See #810. Props vaporwavre.
  • Add code quality checking via phpcs, eslint, jscs, and jshint. See #795. Props westonruter.
  • Add autoloader to reduce complexity. See #828. Props mikeschinkel, westonruter, ThierryA.
  • Fix Polldaddy amd SoundCloud embeds. Add vanilla WordPress “embed” test page. A new bin/create-embed-test-post.php wp-cli script is introduced. See #829. Props kienstra, westonruter, ThierryA.
  • Merge AMP Customizer into main Customizer. See #819. Props kaitnyl, westonruter.
  • Update AMP HTML tags and attributes. A new bin/amphtml-update.sh bash script is introduced. Fixes Playbuzz. See #823. Props kienstra, ThierryA, westonruter.
  • Remove erroneous hash from id on amp-wp-header. See #853. Props eshannon3.

See 0.6 milestone.

0.5.1 (2017-08-17)

  • Fix: issues with invalid tags not being stripped out (e.g. script tags) (h/t tmmbecker, fahmi182, pppdog, seejacobscott, RavanH, jenniejj, lkraav, simonrperry for the reports).
  • Fix: issues with dimension extraction for protocol-less and relative URLs (h/t ktmn for the report).

0.5 (2017-08-04)

  • Whitelist Sanitizer: Replace Blacklist Sanitizer with a whitelist-based approach using the AMP spec (props delputnam)
  • Image Dimensions: Replace fastimage with fasterimage for PHP 5.4+. Enables faster downloads and wider support (props gititon)
  • Embed Handlers: Added support for Vimeo, SoundCloud, Pinterest (props amedina) and PlayBuzz (props lysk88)
  • Analytics: UI for easier addition of analytics tags (props amedina)
  • Fix: parse query strings properly (props amyevans)
  • Fix: Old slug redirect for AMP URLs (props rahulsprajapati)
  • Fix: Handle issues with data uri images in CSS (props trepmal)
  • Fix: Add amp-video js for amp-video tags (props ptbello)
  • Fix: Output CSS for feature image (props mjangda)
  • Fix: Fix attribute when adding AMP Mustache lib (props luigitec)
  • Fix: Various documentation updates (props piersb, bhhaskin)
  • Fix: PHP Warnings from register_customizer_ui (props jahvi)
  • Fix: Coding Standards (props paulschreiber)

0.4.2 (2016-10-13)

  • Fix: Prevent validation errors for html tag (h/t Maxime2 and everyone else that reported this error)
  • Fix: Handle variable name conflict that was causing content_max_width to be ignored (h/t mimancillas)
  • Fix: Prevent errors when nodes don’t have attributes (h/t stephenmax)
  • Fix: Back-compat for 4.5 (add sanitize_hex_color function, h/t xotihcan)
  • Fix: Handle gif featured images (h/t protocolil)
  • Documentation updates (props troyxmccall)

0.4.1 (2016-10-10)

  • Fix: Don’t fire the_content for featured image output
  • Fix: Don’t show comment link when disabled and no comments on post (h/t neotrope)
  • Fix: strip !important from inline styles (h/t compointdesigner and enriccardonagmailcom)

0.4 (2016-10-06)

  • New template: spiffy, shiny, and has the fresh theme smell (props allancole and the Automattic Theme Team).
  • Warning: The template update has potential breaking changes. Please see https://wordpress.org/support/topic/v0-4-whats-new-and-possible-breaking-changes/
  • AMP Customizer: Pick your colors and make the template your own (props DrewAPicture and 10up)
  • Fix: support for inline styles (props coreymckrill).
  • Fix: no more fatal errors when tags not supported by post type (props david-binda)
  • Fix: no more unnecessary <br> tags.
  • Fix: sanitize children of removed nodes (like empty <a> tags) (props Maxime2).
  • Fix: no more broken YouTube URLs with multiple ?s.
  • Fix: properly handle tel and sms schemes (h/t soundstrategies).
  • Fix: remove amp endpoint on deactivate.
  • New filter: amp_pre_get_permalink if you want a completely custom AMP permalink.

0.3.3 (Aug 18, 2016)

  • Handle many more validation errors (props bcampeau and alleyinteractive).
  • New filter: amp_post_template_dir (props mustafauysal).
  • New template: Nav bar is now it’s own template part (props jdevalk).
  • Better ratio for YouTube embeds.
  • Fix: better timezone handling (props rinatkhaziev).
  • Fix: better handling of non-int dimensions (like 100%).
  • Fix: better handling of empty dimensions.
  • Fix: autoplay is a bool-like value.
  • Fix: breakage when using the query_string hook (h/t mkuplens).
  • Fix: don’t break really large Twitter IDs.
  • Fix: don’t break Instagram shortcodes when using URLs with querystrings.
  • Readme improvements (props nickjohnford, sotayamashita)

0.3.2 (Mar 4, 2016)

  • Jetpack Stats support.
  • Better version of Merriweather and use system fonts for sans-serif (props mattmiklic).
  • Move font to stylesheet so it can be more easily overridden (props mattmiklic).
  • Fix: Template loading issues on Windows. (Thanks to everyone who reported this, especially w33zy for pointing out the validate_file issue.)
  • Fix: don’t run AMP on post comment feeds (props kraftbj).
  • Fix: un-break pagination when using a static home page with multiple pages.
  • Fix: force amp-iframe to use https to validate correctly (props mister-ben).
  • Fix: validation for target and video/audio attributes.
  • Fix: clipped images in galleries (thanks tobaco).

0.3.1 (Feb 24, 2016)

  • Allow custom query var (props vaurdan).
  • Fix AMP URLs for non-pretty permalinks (props rakuishi).
  • Fix for password-protected posts.
  • Fix dimension extraction for schema-less or relative image URLs.
  • Better fallback for images with no dimensions.
  • Validation fixes for a tags (props kraftbj).
  • Updated AMP boilerplate.
  • Allow on tags for elements (props Steven Evatt).
  • Prefixed class names.

0.3 (Feb 18, 2016)

  • Fetch dimensions for hotlinked images.
  • Add amp-facebook support.
  • Add some new actions and filters (e.g. amp_init).
  • Fix validation errors for [gallery] shortcodes.
  • Fix issues with path validation on Windows.
  • Fix issues with really squeezed layout.
  • Breaking change: style.css no longer contains the ` tag. If you have a custom stylesheet, you need to update it to remove the tag.
  • Breaking change: single.php no longer includes the AMP boilerplate styles. They are instead added via the amp_post_template_head hook. If you have a custom template, please remove the boilerplate styles.

0.2 (Jan 28, 2016)

  • Lots and lots and lots of compatibility and validation fixes
  • Lots and lots and lots of improvements for customization

0.1

  • Initial version