{"id":90521,"date":"2018-09-17T11:45:21","date_gmt":"2018-09-17T11:45:21","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/amp-wp\/"},"modified":"2026-05-29T23:08:47","modified_gmt":"2026-05-29T23:08:47","slug":"amp-wp","status":"publish","type":"plugin","link":"https:\/\/lt.wordpress.org\/plugins\/amp-wp\/","author":16258819,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.8.0","stable_tag":"1.8.0","tested":"7.0","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"AMP WP","header_author":"Mohsin Rafique, Pixelative","header_description":"Supporting everything in WordPress, it's the best Google AMP solution to date.","assets_banners_color":"f8d6d5","last_updated":"2026-05-29 23:08:47","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/wise.com\/pay\/me\/mohsinr301","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/amp-wp","header_author_uri":"https:\/\/mohsinrafique.com","rating":4.4,"author_block_rating":0,"active_installs":700,"downloads":81737,"num_ratings":56,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"pixelative","date":"2018-09-20 17:34:40"},"1.0.1":{"tag":"1.0.1","author":"pixelative","date":"2018-09-20 17:34:40"},"1.0.2":{"tag":"1.0.2","author":"pixelative","date":"2018-09-20 17:34:40"},"1.0.3":{"tag":"1.0.3","author":"pixelative","date":"2018-09-25 20:20:34"},"1.0.4":{"tag":"1.0.4","author":"pixelative","date":"2018-10-30 19:28:42"},"1.0.5":{"tag":"1.0.5","author":"pixelative","date":"2018-10-31 08:08:12"},"1.1.0":{"tag":"1.1.0","author":"pixelative","date":"2018-11-10 06:00:35"},"1.1.1":{"tag":"1.1.1","author":"pixelative","date":"2018-11-16 23:18:59"},"1.2.0":{"tag":"1.2.0","author":"pixelative","date":"2018-11-29 14:34:08"},"1.2.1":{"tag":"1.2.1","author":"pixelative","date":"2018-12-02 07:19:14"},"1.2.2":{"tag":"1.2.2","author":"pixelative","date":"2018-12-02 08:18:33"},"1.3.0":{"tag":"1.3.0","author":"pixelative","date":"2018-12-03 12:38:22"},"1.3.1":{"tag":"1.3.1","author":"pixelative","date":"2018-12-03 17:03:40"},"1.4.0":{"tag":"1.4.0","author":"pixelative","date":"2018-12-12 18:27:57"},"1.4.1":{"tag":"1.4.1","author":"pixelative","date":"2019-01-04 20:11:03"},"1.4.2":{"tag":"1.4.2","author":"pixelative","date":"2019-01-17 21:06:44"},"1.4.3":{"tag":"1.4.3","author":"pixelative","date":"2019-01-26 00:51:44"},"1.4.3.1":{"tag":"1.4.3.1","author":"pixelative","date":"2019-02-11 20:01:48"},"1.5.0":{"tag":"1.5.0","author":"pixelative","date":"2019-03-26 16:02:17"},"1.5.1":{"tag":"1.5.1","author":"pixelative","date":"2019-03-26 18:38:46"},"1.5.10":{"tag":"1.5.10","author":"pixelative","date":"2019-09-17 18:54:20"},"1.5.11":{"tag":"1.5.11","author":"pixelative","date":"2019-11-25 16:51:04"},"1.5.12":{"tag":"1.5.12","author":"pixelative","date":"2021-06-23 17:52:05"},"1.5.13":{"tag":"1.5.13","author":"pixelative","date":"2021-08-19 17:16:27"},"1.5.14":{"tag":"1.5.14","author":"pixelative","date":"2021-12-24 15:38:16"},"1.5.15":{"tag":"1.5.15","author":"mohsinrafique","date":"2023-07-09 21:36:03"},"1.5.16":{"tag":"1.5.16","author":"pixelative","date":"2024-05-02 21:34:49"},"1.5.17":{"tag":"1.5.17","author":"mohsinrafique","date":"2026-01-28 08:09:23"},"1.5.18":{"tag":"1.5.18","author":"mohsinrafique","date":"2026-01-28 08:09:23"},"1.5.19":{"tag":"1.5.19","author":"mohsinrafique","date":"2026-04-02 23:05:20"},"1.5.2":{"tag":"1.5.2","author":"pixelative","date":"2019-03-27 05:54:45"},"1.5.3":{"tag":"1.5.3","author":"pixelative","date":"2019-04-03 09:04:12"},"1.5.4":{"tag":"1.5.4","author":"pixelative","date":"2019-04-03 09:04:12"},"1.5.5":{"tag":"1.5.5","author":"pixelative","date":"2019-04-18 17:35:41"},"1.5.6":{"tag":"1.5.6","author":"pixelative","date":"2019-04-29 19:30:35"},"1.5.7":{"tag":"1.5.7","author":"pixelative","date":"2019-04-29 19:30:35"},"1.5.8":{"tag":"1.5.8","author":"pixelative","date":"2019-07-18 10:08:06"},"1.5.9":{"tag":"1.5.9","author":"pixelative","date":"2019-09-16 19:09:53"},"1.6.0":{"tag":"1.6.0","author":"mohsinrafique","date":"2026-04-14 21:11:15"},"1.7.0":{"tag":"1.7.0","author":"mohsinrafique","date":"2026-04-23 18:44:19"},"1.7.1":{"tag":"1.7.1","author":"mohsinrafique","date":"2026-04-25 19:54:14"},"1.7.10":{"tag":"1.7.10","author":"mohsinrafique","date":"2026-05-24 23:28:03"},"1.7.11":{"tag":"1.7.11","author":"mohsinrafique","date":"2026-05-25 00:25:14"},"1.7.2":{"tag":"1.7.2","author":"mohsinrafique","date":"2026-04-26 00:20:26"},"1.7.3":{"tag":"1.7.3","author":"mohsinrafique","date":"2026-04-30 11:10:18"},"1.7.4":{"tag":"1.7.4","author":"mohsinrafique","date":"2026-04-30 20:42:52"},"1.7.5":{"tag":"1.7.5","author":"mohsinrafique","date":"2026-05-07 09:20:05"},"1.7.6":{"tag":"1.7.6","author":"mohsinrafique","date":"2026-05-11 22:22:08"},"1.7.7":{"tag":"1.7.7","author":"mohsinrafique","date":"2026-05-14 14:37:30"},"1.7.8":{"tag":"1.7.8","author":"mohsinrafique","date":"2026-05-14 17:01:43"},"1.7.9":{"tag":"1.7.9","author":"mohsinrafique","date":"2026-05-21 16:53:37"},"1.8.0":{"tag":"1.8.0","author":"mohsinrafique","date":"2026-05-29 23:08:47"}},"upgrade_notice":{"1.8.0":"<p>New &quot;Hide Title in Single&quot; toggle in Settings &gt; Layout &gt; Single Post Page. When enabled, the post title (the H1 heading) is hidden on AMP single-post pages - handy when a long title takes up too much space on mobile. Off by default, so existing sites are unaffected; the title still appears in the browser tab and in JSON-LD structured data, so SEO is not impacted.<\/p>","1.7.11":"<p>Hardened the <code>@view-transition<\/code> AMP fix from 1.7.10 with three-layer defense: head `` tag extraction, input-layer stripping, and output-layer safety net. Resolves sites where 1.7.10 alone did not fully eliminate the validation error. No breaking changes.<\/p>","1.7.10":"<p>Fixes AMP validation failure on WordPress 7.0 caused by the new <code>@view-transition<\/code> CSS at-rule. Also includes WPCS code-quality refactors across five function files (core-functions, formatting-functions, utility-functions, theme-functions, ad-functions) and six IDE diagnostic fixes in theme-functions. No breaking changes.<\/p>","1.7.9":"<p>WordPress 7.0 compatibility verified. Also includes PHPCS\/code-quality refactors across multiple component files (img, instagram, playbuzz, iframe, carousel, theme-functions) and a fix for <code>Amp_WP_Html_Util::set_outer_HTML()<\/code> which previously destroyed sibling elements when replacing an iframe embed. No breaking changes.<\/p>","1.7.8":"<p><strong>AdSense Auto Ads for AMP is now turnkey end-to-end.<\/strong> AMP WP 1.7.7 added the <strong>Enable Google Auto Ads<\/strong> toggle (loader in <code>); this release completes the picture by auto-emitting the matching<\/code> element right after `` on every AMP page. Closes the AMP validator error &quot;The extension &#039;amp-auto-ads&#039; was found on this page, but is unused. Please remove this extension.&quot; that surfaced on sites running Google Site Kit, because Site Kit&#039;s AdSense AMP integration only fires for the official Automattic AMP plugin and never injected the body element on AMP WP routes. <strong>Setup:<\/strong> (1) <strong>AMP WP -&gt; Settings -&gt; General<\/strong>, tick <strong>Enable Google Auto Ads<\/strong>, save. (2) Publisher ID is auto-resolved from Google Site Kit&#039;s AdSense module when Site Kit is installed and connected - nothing else to do. (3) Without Site Kit, supply your ID via the new <code>amp_wp_adsense_publisher_id<\/code> filter from your theme&#039;s <code>functions.php<\/code> or a mu-plugin. The filter accepts <code>ca-pub-XXXX<\/code>, <code>pub-XXXX<\/code>, or the bare numeric ID and AMP WP normalises before output; emission is silently skipped when no ID is resolvable so the page stays validator-clean. New public API: function <code>amp_wp_get_adsense_publisher_id()<\/code>, function <code>amp_wp_render_auto_ads_element()<\/code>, filter <code>amp_wp_adsense_publisher_id<\/code>.<\/p>","1.7.7":"<p>Recommended for all users. Critical fix for sites using the <strong>GDPR Compliance<\/strong> banner: the EU country list inside `` was being emitted as a corrupted HTML-encoded string (via <code>esc_js()<\/code> instead of <code>wp_json_encode()<\/code>), causing the AMP runtime to reject the whole config with a &quot;country ... not valid, will be ignored&quot; console error and silently disabling the geo-gated consent banner on every page. Update immediately if you rely on the GDPR consent banner. Also adds a new <strong>native Google Auto Ads toggle<\/strong> on the <strong>Settings &gt; General<\/strong> page - enabling it enqueues the <code>amp-auto-ads<\/code> runtime loader via the canonical AMP component pipeline so admins no longer need to paste the script tag into the Customizer&#039;s head-code field; the manual loader is auto-cleaned on save. Plus a full WPCS sweep of the Tez theme directory (37 files, 49 errors and 31 warnings down to 0\/0, no behaviour change), and a tidy-up that removes a dormant placement-manager file from core.<\/p>","1.7.6":"<p>Recommended for all users. Three SEO-impacting fixes: (1) <code>\/favicon.ico<\/code> and any other root-level static-file request on mobile no longer 302s to <code>\/\/amp<\/code> and 404s. (2) Search-engine crawlers (Googlebot-Mobile, Bingbot, social-card scrapers) are no longer caught by the mobile auto-redirect to AMP, fixing &quot;Redirect error&quot; rows in Google Search Console Page Indexing. After updating, click &quot;Validate fix&quot; on the affected URLs in GSC and Google will re-crawl within 1-7 days. (3) Pagination on AMP archives now works for every URL shape (<code>\/shop\/amp\/page\/N\/<\/code>, <code>\/product-category\/\/amp\/page\/N\/<\/code>, <code>\/category\/\/amp\/page\/N\/<\/code>, etc.) - previously broken when the AMP token appeared in the middle of the URI. Also introduces the new &quot;Premium Extensions&quot; tab (hidden until at least one AMP WP family add-on is active) and the new public APIs <code>amp_wp_register_premium_extension()<\/code> and <code>amp_wp_register_template_path()<\/code> that let AMP WP family add-ons (CF7, Comments, WooCommerce, WPForms, Gravity Forms, Ads Manager) self-register and ship their own AMP templates.<\/p>","1.7.5":"<p>Recommended for all users. Critical fix: mobile visitors could get stuck in a &quot;too many redirects&quot; loop on AMP URLs after admins changed the AMP-exclusion settings. Plugin-issued redirects now use <code>302 Found<\/code> + <code>nocache_headers()<\/code>, with a one-shot <code>Clear-Site-Data: &amp;quot;cache&amp;quot;<\/code> on AMP-excluded redirects to auto-recover any client that already has a stale <code>301<\/code> pinned in its browser cache. The desktop-side cache-plugin fallback is now uncacheable as well, so caching plugins cannot serve a desktop response with a UA-sniffing redirect script to a mobile visitor. Also recommended for users of the AMP WP Comments add-on: Reply links were not appearing on threaded AMP comment lists in WordPress 6.8, the Reply button showed the wrong label, and <code>amp-state<\/code> blocks were silently stripped. Also fixes a malformed AFS Analytics JSON that disabled analytics on AMP pages when AFS Analytics was configured.<\/p>","1.7.4":"<p>Recommended for all users. The header and sidebar logo was silently stripped on every AMP page since v1.7.2 due to a PHPCS escaping regression. Update immediately if your logo is not appearing.<\/p>","1.7.3":"<p>Recommended for all users running any of these plugins alongside AMP WP:\n* Yoast SEO: meta description, Open Graph, and Twitter Card tags were silently missing on all AMP pages with Yoast v14 and above. Duplicate title and robots tags also fixed. A 300-second timeout on the AMP front page caused by an infinite callback loop is also resolved.\n* All In One SEO Pack: meta description, Open Graph, and Twitter Card tags were silently missing on all AMP pages with AIOSEO v4 and above. Homepage title sync also fixed.\n* WP-Optimize: HTML compression, Delay JS, and page caching all previously ran unchecked on AMP pages and could break or cache corrupted output. All three are now correctly disabled for AMP responses.\n* WP Fastest Cache: HTML minification, CSS minification, and comment removal all ran unconditionally on AMP pages. All are now correctly disabled.\n* OneSignal Web Push Notifications: the subscribe\/unsubscribe widget was never rendered on AMP pages due to a code bug. Now fixed.\n* wpForo Forum: AMP pages were incorrectly served on wpForo forum URLs on all wpForo 3.x installs. The detection bug is now fixed.<\/p>","1.7.2":"<p>Recommended for all users. Key fixes in this release:\n* AdSense Auto Ads: corrected head injection order so Auto Ads fire correctly on all AMP pages.\n* Font Awesome: upgraded from 4.7.0 to 6.7.2, eliminating browser console font warnings. No changes to your icons or templates required.\n* Google Analytics: GA4 Measurement IDs (G-XXXXXXXX) now use the correct AMP analytics tag. Fixes the console warning seen after migrating from Universal Analytics.\n* Structured Data: 11 JSON-LD \/ Schema.org issues resolved for better Google Rich Results compliance.<\/p>","1.7.1":"<p>Recommended if you use ACF or other plugins that ship Select2, fixes admin CSS conflicts. Also fixes a UX bug where the &quot;Add Comment&quot; button was hidden on posts with zero comments.<\/p>","1.6.0":"<p>Recommended for all users. Adds Instagram Reels and IGTV support, improves AMP iframe handling and layout detection, fixes PHP 8 compatibility issues, updates JSON-LD structured data to current Schema.org standards, and removes two retired AMP components.<\/p>","1.5.19":"<p>Recommended for PHP 8.4 users. Resolves a deprecated return-type warning in the HTML utility class.<\/p>","1.5.10":"<p>Important fix for sites using the &quot;AMP URL at end&quot; format, which resolves a self-canonical AMP URL issue.<\/p>"},"ratings":{"1":6,"2":1,"3":1,"4":3,"5":45},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2552940,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2552940,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":1946984,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":1946984,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.1.0","1.1.1","1.2.0","1.2.1","1.2.2","1.3.0","1.3.1","1.4.0","1.4.1","1.4.2","1.4.3","1.4.3.1","1.5.0","1.5.1","1.5.10","1.5.11","1.5.12","1.5.13","1.5.14","1.5.15","1.5.16","1.5.17","1.5.18","1.5.19","1.5.2","1.5.3","1.5.4","1.5.5","1.5.6","1.5.7","1.5.8","1.5.9","1.6.0","1.7.0","1.7.1","1.7.10","1.7.11","1.7.2","1.7.3","1.7.4","1.7.5","1.7.6","1.7.7","1.7.8","1.7.9","1.8.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":1946984,"resolution":"1","location":"assets","locale":"","width":609,"height":550},"screenshot-10.png":{"filename":"screenshot-10.png","revision":1946984,"resolution":"10","location":"assets","locale":"","width":609,"height":550},"screenshot-11.png":{"filename":"screenshot-11.png","revision":1946984,"resolution":"11","location":"assets","locale":"","width":609,"height":550},"screenshot-12.png":{"filename":"screenshot-12.png","revision":1946984,"resolution":"12","location":"assets","locale":"","width":609,"height":550},"screenshot-13.png":{"filename":"screenshot-13.png","revision":1984423,"resolution":"13","location":"assets","locale":"","width":609,"height":550},"screenshot-14.png":{"filename":"screenshot-14.png","revision":1993056,"resolution":"14","location":"assets","locale":"","width":609,"height":550},"screenshot-2.png":{"filename":"screenshot-2.png","revision":1946984,"resolution":"2","location":"assets","locale":"","width":609,"height":550},"screenshot-3.png":{"filename":"screenshot-3.png","revision":1946984,"resolution":"3","location":"assets","locale":"","width":609,"height":550},"screenshot-4.png":{"filename":"screenshot-4.png","revision":1946984,"resolution":"4","location":"assets","locale":"","width":609,"height":550},"screenshot-5.png":{"filename":"screenshot-5.png","revision":1946984,"resolution":"5","location":"assets","locale":"","width":609,"height":550},"screenshot-6.png":{"filename":"screenshot-6.png","revision":1993056,"resolution":"6","location":"assets","locale":"","width":609,"height":550},"screenshot-7.png":{"filename":"screenshot-7.png","revision":1946984,"resolution":"7","location":"assets","locale":"","width":609,"height":550},"screenshot-8.png":{"filename":"screenshot-8.png","revision":1946984,"resolution":"8","location":"assets","locale":"","width":609,"height":550},"screenshot-9.png":{"filename":"screenshot-9.png","revision":1946984,"resolution":"9","location":"assets","locale":"","width":609,"height":550}},"screenshots":{"1":"Home Page","2":"Single Post Page","3":"Tags, Social Icons, Related Posts, Comments, and Footer","4":"Search &amp; Archive Page","5":"100% Valid AMP Content","6":"AMP WP Options Panel","7":"AMP Auto Ads Support","8":"Compatible with Major Cache Plugins","9":"Embed Images, Videos, Audios &amp; iFrames","10":"Toggle Search &amp; Header","11":"Recent Comments","12":"Sidebar, Social Icons &amp; Related Posts","13":"Core WordPress Customizer Integration","14":"AMP WP Settings Panel"}},"plugin_section":[],"plugin_tags":[1881,1882,1884,841,5896],"plugin_category":[],"plugin_contributors":[148927,161913],"plugin_business_model":[],"class_list":["post-90521","plugin","type-plugin","status-publish","hentry","plugin_tags-accelerated-mobile-pages","plugin_tags-amp","plugin_tags-google-amp","plugin_tags-mobile","plugin_tags-page-speed","plugin_contributors-mohsinrafique","plugin_contributors-pixelative","plugin_committers-mohsinrafique","plugin_committers-pixelative","plugin_support_reps-pixelative"],"banners":{"banner":"https:\/\/ps.w.org\/amp-wp\/assets\/banner-772x250.png?rev=1946984","banner_2x":"https:\/\/ps.w.org\/amp-wp\/assets\/banner-1544x500.png?rev=1946984","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/amp-wp\/assets\/icon-128x128.png?rev=2552940","icon_2x":"https:\/\/ps.w.org\/amp-wp\/assets\/icon-256x256.png?rev=2552940","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-1.png?rev=1946984","caption":"Home Page"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-2.png?rev=1946984","caption":"Single Post Page"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-3.png?rev=1946984","caption":"Tags, Social Icons, Related Posts, Comments, and Footer"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-4.png?rev=1946984","caption":"Search &amp; Archive Page"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-5.png?rev=1946984","caption":"100% Valid AMP Content"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-6.png?rev=1993056","caption":"AMP WP Options Panel"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-7.png?rev=1946984","caption":"AMP Auto Ads Support"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-8.png?rev=1946984","caption":"Compatible with Major Cache Plugins"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-9.png?rev=1946984","caption":"Embed Images, Videos, Audios &amp; iFrames"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-10.png?rev=1946984","caption":"Toggle Search &amp; Header"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-11.png?rev=1946984","caption":"Recent Comments"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-12.png?rev=1946984","caption":"Sidebar, Social Icons &amp; Related Posts"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-13.png?rev=1984423","caption":"Core WordPress Customizer Integration"},{"src":"https:\/\/ps.w.org\/amp-wp\/assets\/screenshot-14.png?rev=1993056","caption":"AMP WP Settings Panel"}],"raw_content":"<!--section=description-->\n<p><strong>AMP WP<\/strong> is the most feature-rich, developer-friendly, and beginner-ready Google AMP plugin available for WordPress, completely free.<\/p>\n\n<p>Originally built by <strong><a href=\"https:\/\/pixelative.co\">Pixelative<\/a><\/strong>, a professional web development agency, AMP WP is now independently developed and maintained by <strong><a href=\"https:\/\/mohsinrafique.com\">Mohsin Rafique<\/a><\/strong>, the lead engineer behind the plugin since its inception. AMP WP has helped thousands of website owners dramatically improve mobile page speed, search rankings, and user experience.<\/p>\n\n<p><a href=\"https:\/\/pixelspress.com\/amp\">Online Demo<\/a> | <a href=\"https:\/\/1c8979da.sibforms.com\/serve\/MUIFAPfaW_zG5aVJNBG78I1qIu30utV8kT5_ERiosqVMstRk9Nj1o6RVbEbyaJkvyZ9TQ3b79YDkpPjsyd99NmbxAlNtZQrx9TkcFAF3V6DvgcoiCcnaZkgvPxl_OpctNUzI-G7xDKxwMq2d2Cm2RteW4LoOxEi-XMmdvhfCiMDxfBsOx18Pd9U1xsTcOqIdyT9WccheL83rrsCeeQ==\">CF7 Premium Extension<\/a> | <a href=\"mailto:mohsin.rafique@gmail.com\">Support<\/a><\/p>\n\n\n\n<h3>Why AMP WP?<\/h3>\n\n<p>Google's Accelerated Mobile Pages (AMP) technology delivers pages up to <strong>5x faster<\/strong> on mobile devices. Faster pages mean lower bounce rates, higher engagement, and better rankings in Google Search. AMP WP makes enabling AMP on your WordPress site effortless, from a single settings panel with no theme modifications needed.<\/p>\n\n\n\n<h3>Free Features<\/h3>\n\n<p><strong>Performance &amp; Compatibility<\/strong>\n* Full Google AMP specification compliance (100% valid AMP output)\n* PHP 8.x compatible (tested through PHP 8.4)\n* Compatible with all major caching plugins (WP Rocket, SG Optimizer, W3 Total Cache, and more)\n* Compatible with Jetpack\n* Compatible with Yoast SEO (100%)\n* Compatible with \"Automattic AMP\" plugin\n* Gutenberg block editor support\n* RTL language support (100%)\n* GDPR compliant<\/p>\n\n<p><strong>Content &amp; Embeds<\/strong>\n* Automatic AMP conversion for Posts, Pages, and Custom Post Types\n* Embed Images, Videos, Audios, and iFrames: YouTube, Vimeo, Twitter, Facebook, SoundCloud, Instagram (Posts, Reels &amp; TV)\n* Lightbox for Images\n* Slider Support\n* Internal AMP Linking\n* Native AMP Search<\/p>\n\n<p><strong>Design &amp; Customization<\/strong>\n* Two listing layouts: Classic View and List View\n* Customizable color scheme\n* Custom CSS options\n* Sticky Header\n* AMP WordPress Navigation Menu\n* Custom AMP Front Page\n* Social Icons<\/p>\n\n<p><strong>Control<\/strong>\n* Show\/Hide AMP for individual Posts, Pages, and Custom Post Types\n* Show\/Hide AMP for Taxonomies (Categories, Tags, Custom)\n* Show\/Hide AMP mobile redirections\n* Show\/Hide AMP on Search pages\n* Show\/Hide Date, Author, and Thumbnail across Archive, Single Post, Related Posts, and Slider\n* Show\/Hide Tags on Single Post pages\n* Enable\/Disable Structured Data (JSON-LD Schema)<\/p>\n\n<p><strong>Engagement &amp; Analytics<\/strong>\n* Related Posts (with thumbnail, date, and author controls)\n* Recent Comments\n* Notice Bar\n* Sidebar\n* Social Sharing Buttons\n* OneSignal Push Notifications integration\n* Third-party analytics support: Google Analytics, Facebook Pixel, Segment, Quantcast, Alexa Metrics, Chartbeat, comScore, Yandex Metrica, AFS Analytics, Adobe Analytics<\/p>\n\n<p><strong>Ads<\/strong>\n* Google AdSense Auto Ads for AMP support<\/p>\n\n<p><strong>Multilingual<\/strong>\n* Translation Panel included\n* Contact us at <code>mohsin.rafique@gmail.com<\/code> to contribute translations<\/p>\n\n\n\n<h3>Maintained by Mohsin Rafique<\/h3>\n\n<p>AMP WP was originally created by <strong><a href=\"https:\/\/pixelative.co\">Pixelative<\/a><\/strong>, a full-service digital agency specializing in high-performance WordPress solutions, and remains under Pixelative's ownership. The plugin is currently developed, updated, and supported independently by <strong>Mohsin Rafique<\/strong>, a seasoned WordPress engineer with deep expertise in AMP specification compliance, PHP performance, and modern web standards.<\/p>\n\n<p>For support, custom AMP theme development, or white-label licensing, contact <strong>Mohsin Rafique<\/strong> at <a href=\"https:\/\/mohsinrafique.com\">mohsinrafique.com<\/a> or <a href=\"mailto:mohsin.rafique@gmail.com\">mohsin.rafique@gmail.com<\/a>.<\/p>\n\n\n\n<h4>Credits<\/h4>\n\n<ul>\n<li><a href=\"https:\/\/wppb.me\/\">WordPress Plugin Boilerplate Generator<\/a> by Tom McFarlin, License: GPLv2<\/li>\n<li><a href=\"http:\/\/necolas.github.io\/normalize.css\/\">normalize.css<\/a>, License: MIT<\/li>\n<li><a href=\"https:\/\/fonts.google.com\/specimen\/Karla\">Karla<\/a> by Jonathan Pinhorn, License: SIL OFL<\/li>\n<li><a href=\"https:\/\/fonts.google.com\/specimen\/Noto+Sans\">Noto Sans<\/a> by Google, License: SIL OFL<\/li>\n<li><a href=\"https:\/\/fonts.google.com\/specimen\/Overpass+Mono\">Overpass Mono<\/a> by Delve Withrington, License: SIL OFL<\/li>\n<li><a href=\"https:\/\/fontawesome.com\/license\">Font Awesome Free 6.7.2<\/a> by Fonticons, Inc., Font: SIL OFL 1.1 \/ Code: MIT<\/li>\n<\/ul>\n\n<h3>Minimum Requirements<\/h3>\n\n<ul>\n<li>WordPress 5.0 or higher<\/li>\n<li>PHP 7.4 or higher<\/li>\n<li>MySQL 8.0+ or MariaDB 10.5+<\/li>\n<\/ul>\n\n<p><strong>Tip:<\/strong> Install <a href=\"https:\/\/wordpress.org\/plugins\/regenerate-thumbnails\/\">Regenerate Thumbnails<\/a> and regenerate your thumbnails after activation to ensure the post listing layout renders correctly.<\/p>\n\n<h3>Automatic Installation (Recommended)<\/h3>\n\n<ol>\n<li>Log in to your WordPress admin panel.<\/li>\n<li>Navigate to <strong>Plugins -&gt; Add New<\/strong>.<\/li>\n<li>Search for <strong>AMP WP<\/strong>.<\/li>\n<li>Click <strong>Install Now<\/strong>, then <strong>Activate<\/strong>.<\/li>\n<li>Go to <strong>AMP WP -&gt; Customize AMP<\/strong> to configure your settings.<\/li>\n<\/ol>\n\n<h3>Manual Installation<\/h3>\n\n<ol>\n<li>Download the plugin ZIP from the WordPress plugin repository.<\/li>\n<li>Extract the ZIP and upload the <code>amp-wp<\/code> folder to <code>\/wp-content\/plugins\/<\/code> via FTP or your hosting file manager.<\/li>\n<li>Activate the plugin from <strong>Plugins<\/strong> in your WordPress admin panel.<\/li>\n<li>Navigate to <strong>AMP WP -&gt; Customize AMP<\/strong> to begin setup.<\/li>\n<\/ol>\n\n<h3>Developer Hooks<\/h3>\n\n<p>AMP WP exposes WordPress-standard actions and filters throughout its template system, URL generator, structured data engine, and admin panel. All hooks listed here are safe to use in a child theme's <code>functions.php<\/code> or in a standalone plugin. No plugin file edits are needed.<\/p>\n\n<h4>Template Actions<\/h4>\n\n<p>These actions fire inside AMP WP's own template system. They do not use <code>wp_head<\/code> or <code>wp_footer<\/code>. Output must be valid AMP markup.<\/p>\n\n<p><strong><code>amp_wp_template_head<\/code><\/strong>\nFires inside the AMP <code>&lt;head&gt;<\/code> element. Use for custom meta tags or other head markup. AMP WP reserves priority 0 for component scripts.<\/p>\n\n<p><strong><code>amp_wp_template_head_deferred<\/code><\/strong>\nFires in <code>&lt;head&gt;<\/code> after the AMP boilerplate styles have been written. Required injection point for <code>&lt;amp-auto-ads&gt;<\/code> and any snippet that must follow the boilerplate. AMP WP's own styles and scripts output here.<\/p>\n\n<p><strong><code>amp_wp_template_body_start<\/code><\/strong>\nFires immediately after the opening <code>&lt;body&gt;<\/code> tag.<\/p>\n\n<p><strong><code>amp_wp_body_beginning<\/code><\/strong>\nFires at the start of visible body content, before the site header renders.<\/p>\n\n<p><strong><code>amp_wp_post_content_below<\/code><\/strong>\nFires directly below the post content on single post pages.<\/p>\n\n<p><strong><code>amp_wp_template_footer<\/code><\/strong>\nFires before the closing <code>&lt;\/body&gt;<\/code> tag. Priority 999 is reserved for AMP WP's output sanitizer.<\/p>\n\n<p><strong><code>amp_wp_template_enqueue_scripts<\/code><\/strong>\nUse to register additional AMP component scripts. Call <code>amp_wp_enqueue_script( $handle, $src )<\/code> inside your callback.<\/p>\n\n<p><strong><code>amp_wp_after_comment_list<\/code><\/strong>\nFires after the comment list on single post pages.<\/p>\n\n<p><strong><code>amp_wp_notifications_bar<\/code><\/strong>\nFires inside the notification\/notice bar template slot.<\/p>\n\n<p><strong><code>amp_wp_gdpr_compliance<\/code><\/strong>\nFires inside the GDPR banner template slot.<\/p>\n\n<h4>Analytics Actions<\/h4>\n\n<p>These actions fire in the AMP page footer. Each corresponds to one analytics provider already supported by AMP WP. Hook into any of them to append a custom <code>&lt;amp-analytics&gt;<\/code> block for a provider not yet built in, or to modify the existing output before it renders.<\/p>\n\n<ul>\n<li><code>amp_wp_analytics_ga<\/code> (Google Analytics)<\/li>\n<li><code>amp_wp_analytics_fbp<\/code> (Facebook Pixel)<\/li>\n<li><code>amp_wp_analytics_sa<\/code> (Simple Analytics)<\/li>\n<li><code>amp_wp_analytics_qc<\/code> (Quantcast)<\/li>\n<li><code>amp_wp_analytics_acm<\/code> (Adobe Campaign Manager)<\/li>\n<li><code>amp_wp_analytics_cb<\/code> (Chartbeat)<\/li>\n<li><code>amp_wp_analytics_comscore<\/code> (comScore)<\/li>\n<li><code>amp_wp_analytics_yandex_metrica<\/code> (Yandex Metrica)<\/li>\n<li><code>amp_wp_analytics_afs<\/code> (AFS Analytics)<\/li>\n<li><code>amp_wp_analytics_adobe<\/code> (Adobe Analytics)<\/li>\n<\/ul>\n\n<h4>AMP Version Control Filters<\/h4>\n\n<p><strong><code>amp_wp_amp_version_exists<\/code><\/strong>\nControl whether an AMP version is served for the current request. Return <code>false<\/code> to disable AMP for that page.\nParameter: <code>(bool) $exists<\/code><\/p>\n\n<pre><code>add_filter( 'amp_wp_amp_version_exists', '__return_false' );\n<\/code><\/pre>\n\n<p><strong><code>amp_wp_template_auto_redirect<\/code><\/strong>\nEnable automatic redirection of all visitors from the non-AMP URL to the AMP URL. Default <code>false<\/code>.\nParameter: <code>(bool) $redirect<\/code><\/p>\n\n<p><strong><code>amp_wp_filter_config_list<\/code><\/strong>\nExtend the list of post types, taxonomies, and conditions where AMP is disabled site-wide.\nParameter: <code>(array) $filters<\/code><\/p>\n\n<h4>URL and Permalink Filters<\/h4>\n\n<p><strong><code>amp_wp_pre_get_permalink<\/code><\/strong>\nShort-circuit AMP permalink generation. Return any non-false value to bypass the core URL builder.\nParameters: <code>(mixed) $pre<\/code> (default false), <code>(int) $post_id<\/code><\/p>\n\n<p><strong><code>amp_wp_get_permalink<\/code><\/strong>\nFilter the final AMP URL after it has been built.\nParameters: <code>(string) $amp_url<\/code>, <code>(int) $post_id<\/code><\/p>\n\n<p><strong><code>amp_wp_url_format_filter<\/code><\/strong>\nChange the AMP URL format. Accepted values: <code>start-point<\/code> (prefix, e.g. <code>\/amp\/slug<\/code>) or <code>end-point<\/code> (suffix, e.g. <code>\/slug\/amp<\/code>).\nParameter: <code>(string) $format<\/code><\/p>\n\n<p><strong><code>amp_wp_url_excluded<\/code><\/strong>\nAdd URL paths that must never serve an AMP version.\nParameter: <code>(array) $excluded_urls<\/code><\/p>\n\n<p><strong><code>amp_wp_transformer_exclude_subdir<\/code><\/strong>\nAdd path segments that the AMP URL transformer should skip when rewriting internal links. Used internally by AMP WP for WPML and Polylang language prefixes.\nParameter: <code>(array) $exclude_dirs<\/code><\/p>\n\n<h4>Structured Data Filters (JSON-LD)<\/h4>\n\n<p>All JSON-LD filters are active only when \"Enable Structured Data on Site\" is on in AMP WP Settings. The three schema-data filters carry a trailing underscore. This is generated internally via <code>sprintf( 'amp_wp_json_ld_%s_', $type )<\/code> and the underscore must be part of the hook name you register.<\/p>\n\n<p><strong><code>amp_wp_json_ld_config<\/code><\/strong>\nFilters the generator configuration before any schema is built.<\/p>\n\n<p>Parameter: <code>(array) $config<\/code> with keys:\n* <code>active<\/code> (bool): set <code>false<\/code> to disable the entire JSON-LD generator for the current request.\n* <code>logo<\/code> (string): Organization logo URL. When non-empty, an <code>Organization<\/code> block is emitted on every page and all Article-type schemas reference it by <code>@id<\/code>.\n* <code>posts_type<\/code> (string): Fallback schema type when <code>schema_type_for_post<\/code> is empty. Default <code>BlogPosting<\/code>.\n* <code>media_field_id<\/code> (string): Post meta key for audio\/video URL in format posts. Default <code>_featured_embed_code<\/code>.<\/p>\n\n<p>AMP WP core attaches at priority 15 to inject the branding logo. Use priority 20 or higher to override it.<\/p>\n\n<pre><code>add_filter( 'amp_wp_json_ld_config', function( $config ) { ... }, 20 );\n<\/code><\/pre>\n\n<p><strong><code>amp_wp_json_ld_organization_<\/code><\/strong>\nFilters the <code>Organization<\/code> schema array before output. Fires only when a logo is configured. Return <code>false<\/code> or an empty array to suppress the block.\nParameter: <code>(array) $data<\/code><\/p>\n\n<pre><code>add_filter( 'amp_wp_json_ld_organization_', function( $data ) { ... } );\n<\/code><\/pre>\n\n<p><strong><code>amp_wp_json_ld_website_<\/code><\/strong>\nFilters the <code>WebSite<\/code> schema array before output. Fires only on the homepage and front page.\nParameter: <code>(array) $data<\/code><\/p>\n\n<pre><code>add_filter( 'amp_wp_json_ld_website_', function( $data ) { ... } );\n<\/code><\/pre>\n\n<p><strong><code>amp_wp_json_ld_single_<\/code><\/strong>\nFilters the singular-content schema array before output. Fires on all singular pages: standard posts (Article, NewsArticle, BlogPosting), static pages (WebPage), WooCommerce products (Product), post format overrides (AudioObject, VideoObject, ImageObject), and custom post types.\nParameter: <code>(array) $data<\/code><\/p>\n\n<pre><code>add_filter( 'amp_wp_json_ld_single_', function( $data ) { ... } );\n<\/code><\/pre>\n\n<h4>Content and Theme Filters<\/h4>\n\n<p><strong><code>amp_wp_template_page_on_front<\/code><\/strong>\nSpecify the page ID to use as the AMP front page when a static homepage is configured.\nParameter: <code>(int) $page_id<\/code>, default 0.<\/p>\n\n<p><strong><code>amp_wp_template_show_on_front<\/code><\/strong>\nControl what displays on the AMP homepage. Accepted values: <code>posts<\/code> or <code>page<\/code>.\nParameter: <code>(string) $show_on_front<\/code><\/p>\n\n<p><strong><code>amp_wp_template_active_template<\/code><\/strong>\nOverride the active template metadata array.\nParameter: <code>(array) $template_info<\/code><\/p>\n\n<p><strong><code>amp_wp_template_set_menu_walker<\/code><\/strong>\nEnable or disable the custom sidebar menu walker for a specific nav menu location.\nParameters: <code>(bool) $use_walker<\/code>, <code>(array) $args<\/code><\/p>\n\n<p><strong><code>amp-wp-template-default-theme-mod<\/code><\/strong>\nSet default values for AMP WP Customizer options.\nParameters: <code>(mixed) $default_value<\/code>, <code>(string) $option_key<\/code><\/p>\n\n<p><strong><code>amp_wp_home_featured<\/code><\/strong>\nCustomize the <code>WP_Query<\/code> arguments used to fetch posts for the homepage featured slider.\nParameter: <code>(array) $query_args<\/code><\/p>\n\n<p><strong><code>amp_wp_get_template<\/code><\/strong>\nOverride the file path used to locate a template part.\nParameters: <code>(string) $located<\/code>, <code>(string) $file<\/code>, <code>(array) $args<\/code>, <code>(string) $template_path<\/code>, <code>(string) $default_path<\/code><\/p>\n\n<p><strong><code>amp_wp_html_dom_filter_attributes<\/code><\/strong>\nFilter an HTML element's attributes during the DOM processing pipeline.\nParameters: <code>(array) $attributes<\/code>, <code>(string) $tag_name<\/code>, <code>(array) $valid_attributes<\/code><\/p>\n\n<p><strong><code>amp_wp_style_files_{$file}<\/code><\/strong>\nFilter CSS file content before it is added to the inline <code>&lt;style amp-custom&gt;<\/code> block. <code>{$file}<\/code> is the stylesheet handle.\nParameter: <code>(string) $css<\/code><\/p>\n\n<p><strong><code>amp_wp_social_share_cache_time<\/code><\/strong>\nSet the cache duration in seconds for social share counts. Default 7200 (120 minutes).\nParameters: <code>(int) $seconds<\/code>, <code>(int) $post_id<\/code><\/p>\n\n<p><strong><code>amp_wp_social_share_count<\/code><\/strong>\nFilter social share count results after they are fetched.\nParameter: <code>(array) $results<\/code><\/p>\n\n<p><strong><code>amp_wp_gdpr_country_list<\/code><\/strong>\nCustomize the list of countries considered GDPR-compliant.\nParameter: <code>(array) $countries<\/code><\/p>\n\n<p><strong><code>amp_wp_translation_std<\/code><\/strong>\nProvide or override fallback translation strings.\nParameter: <code>(array) $translations<\/code><\/p>\n\n<h4>Admin and Settings Hooks<\/h4>\n\n<p><strong><code>amp_wp_settings_tab_menus<\/code><\/strong> (filter)\nAdd a custom tab to the AMP WP settings panel. Key is the tab slug, value is the tab label HTML.\nParameter: <code>(array) $tabs<\/code><\/p>\n\n<pre><code>add_filter( 'amp_wp_settings_tab_menus', function( $tabs ) { $tabs['my-tab'] = '&lt;span&gt;My Tab&lt;\/span&gt;'; return $tabs; } );\n<\/code><\/pre>\n\n<p><strong><code>amp_wp_settings_tab_section<\/code><\/strong> (action)\nRender the HTML content for your custom settings tab. Check <code>$_GET['tab']<\/code> to target a specific tab.<\/p>\n\n<p><strong><code>amp_wp_save_setting_sections<\/code><\/strong> (action)\nFires when the settings form is submitted. Hook here to read and save data for a custom tab.<\/p>\n\n<p><strong><code>amp_wp_save_setting_notice<\/code><\/strong> (filter)\nCustomize the \"Settings saved.\" notice text.\nParameter: <code>(string) $notice_text<\/code><\/p>\n\n<p><strong><code>amp_wp_welcome_tab_menus<\/code><\/strong> (filter)\nAdd a custom tab to the AMP WP welcome\/dashboard page.\nParameter: <code>(array) $tabs<\/code><\/p>\n\n<p><strong><code>amp_wp_welcome_tab_section<\/code><\/strong> (action)\nRender HTML content for a custom welcome page tab.<\/p>\n\n<p><strong><code>amp_wp_default_configurations<\/code><\/strong> (action)\nFires on plugin activation. Hook here to set default options for add-on plugins.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"what%20is%20the%20url%20structure%20for%20amp%20pages%3F\"><h3>What is the URL structure for AMP pages?<\/h3><\/dt>\n<dd><p>AMP WP supports two URL formats:<\/p>\n\n<ol>\n<li><strong>Prefix format:<\/strong> <code>https:\/\/yoursite.com\/amp\/page-name<\/code><\/li>\n<li><strong>Suffix format:<\/strong> <code>https:\/\/yoursite.com\/page-name\/amp<\/code><\/li>\n<\/ol>\n\n<p>You can choose your preferred format from <strong>AMP WP -&gt; Settings -&gt; General<\/strong>.<\/p><\/dd>\n<dt id=\"how%20do%20i%20add%20analytics%20tracking%3F\"><h3>How do I add analytics tracking?<\/h3><\/dt>\n<dd><p>Go to <strong>AMP WP -&gt; Settings -&gt; Analytics<\/strong> in your WordPress admin dashboard. AMP WP supports Google Analytics, Facebook Pixel, Segment, Quantcast, Alexa Metrics, Chartbeat, comScore, Yandex Metrica, AFS Analytics, and Adobe Analytics.<\/p><\/dd>\n<dt id=\"the%20post%20listing%20layout%20looks%20broken%3A%20how%20do%20i%20fix%20it%3F\"><h3>The post listing layout looks broken: how do I fix it?<\/h3><\/dt>\n<dd><p>This is usually caused by inconsistent thumbnail sizes. Install and run <a href=\"https:\/\/wordpress.org\/plugins\/regenerate-thumbnails\/\">Regenerate Thumbnails<\/a> to normalize all image sizes.<\/p><\/dd>\n<dt id=\"does%20amp%20wp%20support%20instagram%20reels%20and%20tv%20posts%3F\"><h3>Does AMP WP support Instagram Reels and TV posts?<\/h3><\/dt>\n<dd><p>Yes. Since version 1.6.0, AMP WP supports Instagram <code>\/p\/<\/code>, <code>\/reel\/<\/code>, and <code>\/tv\/<\/code> post types natively via <code>amp-instagram<\/code>.<\/p><\/dd>\n<dt id=\"what%20prebuilt%20listing%20layouts%20are%20available%3F\"><h3>What prebuilt listing layouts are available?<\/h3><\/dt>\n<dd><p>Two layouts are included: <strong>Classic View<\/strong> and <strong>List View<\/strong>. Switch between them from <strong>AMP WP -&gt; Options Panel<\/strong>.<\/p><\/dd>\n<dt id=\"how%20do%20i%20inject%20custom%20html%20%28e.g.%2C%20ad%20codes%2C%20analytics%20snippets%29%3F\"><h3>How do I inject custom HTML (e.g., ad codes, analytics snippets)?<\/h3><\/dt>\n<dd><p>Go to <strong>Dashboard -&gt; AMP WP -&gt; Customize AMP<\/strong>. You can inject valid AMP snippets:\n* Between <code>&lt;head&gt;&lt;\/head&gt;<\/code> tags\n* Right after the <code>&lt;body&gt;<\/code> opening tag\n* Right before the <code>&lt;\/body&gt;<\/code> closing tag<\/p>\n\n<p>Only valid, AMP-compatible code will function on AMP pages.<\/p><\/dd>\n<dt id=\"how%20do%20i%20enable%20adsense%20auto%20ads%20for%20amp%3F\"><h3>How do I enable AdSense Auto Ads for AMP?<\/h3><\/dt>\n<dd><p><strong>Recommended path (AMP WP 1.7.7 and later):<\/strong><\/p>\n\n<ol>\n<li>Open <strong>Dashboard -&gt; AMP WP -&gt; Settings -&gt; General<\/strong>.<\/li>\n<li>Scroll to the <strong>Google Auto Ads<\/strong> section.<\/li>\n<li>Tick the <strong>Enable Google Auto Ads<\/strong> checkbox and click <strong>Save Changes<\/strong>.<\/li>\n<\/ol>\n\n<p>When the toggle is on, AMP WP automatically takes care of both halves that AdSense Auto Ads needs on every AMP page:<\/p>\n\n<ul>\n<li>The <code>amp-auto-ads<\/code> runtime loader (<code>&lt;script async custom-element=\"amp-auto-ads\" src=\"https:\/\/cdn.ampproject.org\/v0\/amp-auto-ads-0.1.js\"&gt;&lt;\/script&gt;<\/code>) is injected inside <code>&lt;head&gt;<\/code> via the canonical AMP component pipeline.<\/li>\n<li>The matching <code>&lt;amp-auto-ads type=\"adsense\" data-ad-client=\"ca-pub-XXXXXXXXXXXXXXXX\"&gt;<\/code> element is emitted right after <code>&lt;body&gt;<\/code> so the AMP validator sees the extension as \"used\" and AdSense can place anchor, vignette, and in-page ads.<\/li>\n<\/ul>\n\n<p><strong>Where does the publisher ID come from?<\/strong><\/p>\n\n<ul>\n<li><strong>With Google Site Kit installed and AdSense connected:<\/strong> the publisher ID is read automatically from Site Kit's stored AdSense module setting (no extra typing needed).<\/li>\n<li><p><strong>Without Site Kit:<\/strong> supply your <code>ca-pub-...<\/code> value via the <code>amp_wp_adsense_publisher_id<\/code> filter. Drop this into your theme's <code>functions.php<\/code> or a small mu-plugin:<\/p>\n\n<p>add_filter( 'amp_wp_adsense_publisher_id', function() { return 'ca-pub-XXXXXXXXXXXXXXXX'; } );<\/p><\/li>\n<\/ul>\n\n<p>The filter accepts any of the three plausible input shapes - <code>ca-pub-XXXX<\/code>, <code>pub-XXXX<\/code>, or the bare numeric ID - and AMP WP normalises the value before output. If no publisher ID is resolvable, AMP WP silently skips the body-side element so the page stays validator-clean.<\/p>\n\n<p><strong>Manual fallback (non-AdSense ad networks, custom snippets):<\/strong><\/p>\n\n<p>Navigate to <strong>Dashboard -&gt; AMP WP -&gt; Customize AMP<\/strong>. Paste the runtime loader script in the <em>\"Codes between <code>&lt;head&gt;<\/code> and <code>&lt;\/head&gt;<\/code> tags\"<\/em> field, and your <code>&lt;amp-auto-ads&gt;<\/code> (or other AMP-valid ad markup) in the <em>\"Codes right after <code>&lt;body&gt;<\/code> tag\"<\/em> field. When you later enable the native <strong>Google Auto Ads<\/strong> toggle, AMP WP auto-cleans any manually-pasted <code>amp-auto-ads<\/code> loader from the head-code field and surfaces a one-shot admin notice confirming the cleanup, so the native injection path remains the single source of truth.<\/p>\n\n<p><a href=\"https:\/\/support.google.com\/adsense\/answer\/9011465\">AdSense Auto Ads for AMP - Google Help<\/a><\/p><\/dd>\n<dt id=\"how%20do%20i%20enable%20or%20disable%20amp%20for%20a%20specific%20post%3F\"><h3>How do I enable or disable AMP for a specific post?<\/h3><\/dt>\n<dd><p>Edit the post in WordPress, scroll to the <strong>AMP WP<\/strong> meta box in the sidebar, and toggle the AMP option on or off for that individual post.<\/p><\/dd>\n<dt id=\"how%20do%20i%20report%20a%20bug%20or%20request%20a%20feature%3F\"><h3>How do I report a bug or request a feature?<\/h3><\/dt>\n<dd><p>Please email <code>mohsin.rafique@gmail.com<\/code> or open a thread on the <a href=\"https:\/\/wordpress.org\/support\/plugin\/amp-wp\/\">WordPress support forum<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.8.0 - 2026-05-30<\/h4>\n\n<p><strong>Features<\/strong>\n* New \"Hide Title in Single\" toggle in Settings &gt; Layout &gt; Single Post Page. When enabled, the post title (the H1 heading) is hidden on AMP single-post pages - handy when a long title takes up too much space on mobile. Off by default, so existing sites are unaffected; the title still appears in the browser tab and in JSON-LD structured data, so SEO is not impacted.<\/p>\n\n<p><strong>Fixed<\/strong>\n* AMP-Validity: Added a CSS value sanitizer that rounds decimal <code>rgb()<\/code>\/<code>rgba()<\/code> values to integers and strips <code>attr()<\/code> \/ <code>type()<\/code> (CSS Level 5) declarations. Resolves the \"CSS syntax error in tag style amp-custom\" validation error caused by WordPress 7.0 view-transitions CSS and Dart Sass compiled stylesheets.<\/p>\n\n<p><strong>Improvements<\/strong>\n* Docs: Split the changelog so the readme stays within the WordPress.org 5,000-word limit. Recent releases remain here; the complete history now lives in changelog.txt (WordPress.org archive) and the GitHub Markdown mirror CHANGELOG.md. Changelog entries are standardised into the section order Features, Security, Fixed, Improvements, WordPress Compatibility (Compat), Refactored.<\/p>\n\n<p><strong>Refactored<\/strong>\n* WPCS cleanup of class-amp-wp-layout.php: added the missing class docblock and terminated four section-marker comments. No behaviour change.\n* WPCS cleanup of the Layout settings admin view (amp-wp-admin-layout.php): added the missing blank line after the file docblock, supplied the <code>amp-wp<\/code> text domain on two untranslated option labels, and switched loose comparisons to strict - select dropdowns now use <code>===<\/code> against their string values while on\/off toggles use <code>! empty()<\/code> (avoids the int-vs-string trap where a saved <code>1<\/code> would not match <code>'1'<\/code> under <code>===<\/code>). No behaviour change.\n* WPCS cleanup of the General settings admin view (amp-wp-admin-general.php): switched the two AMP URL Format dropdown comparisons (<code>start-point<\/code> \/ <code>end-point<\/code>) to strict <code>===<\/code>, and defaulted the variables the view receives from its controller (null-coalescing to the controller's own defaults) so the template also resolves cleanly under static analysis. No behaviour change.\n* WPCS cleanup of five Settings tab classes (general, premium-extensions, social-links, structured-data, third-party-plugins-support): added missing file\/class docblocks, moved the <code>ABSPATH<\/code> guard below the file docblock where it had been inlined on the opening tag, and terminated inline\/param comments. No behaviour change.\n* WPCS cleanup of the Translation settings class (class-amp-wp-translation.php): same docblock\/guard\/comment fixes, plus added the required <code>translators:<\/code> comments for the placeholder strings \"Reply To %s\" and \"Page %1$s of %2$s\" so the placeholders are documented for translators. No behaviour change.\n* WPCS cleanup of the Analytics settings class (class-amp-wp-analytics.php): added the missing class docblock. No behaviour change.\n* Docs: fixed malformed <code>@param<\/code> PHPDoc blocks on the <code>amp_wp_settings_tab_menus<\/code> (class-amp-wp-settings.php) and <code>amp_wp_welcome_tab_menus<\/code> (class-amp-wp-welcome.php) filters (invalid <code>array (){<\/code> hash notation that broke static analysis) and corrected an <code>@Since<\/code> tag typo. No behaviour change.\n* Removed: deleted the orphaned, never-loaded duplicate class file class-amp-wp-system-status-override-function.php (it redeclared the active Amp_WP_System_Status class and still carried old WooCommerce-coupled code). Also finished WPCS cleanup of the active class-amp-wp-system-status.php: added the class docblock, reworded a comment, and dropped an unnecessary <code>@<\/code> error-suppression on <code>ini_get()<\/code>. No behaviour change.\n* WPCS cleanup of the Help admin class (class-amp-wp-help.php): added the missing class docblock and reworded a comment flagged as commented-out code. No behaviour change.\n* WPCS cleanup of three Welcome-page tab classes (class-amp-wp-credits.php, class-amp-wp-features.php, class-amp-wp-getting-started.php): added the missing class docblock to each. No behaviour change.<\/p>\n\n<h4>1.7.11 - 2026-05-25<\/h4>\n\n<p><strong>Fixed<\/strong>\n* AMP-Validity: Three-layer defense for the <code>@view-transition<\/code> validation error on WordPress 7.0 sites with View Transitions enabled, covering head <code>&lt;style&gt;<\/code> extraction plus input-layer and output-layer stripping.<\/p>\n\n<h4>1.7.10 - 2026-05-25<\/h4>\n\n<p><strong>Fixed<\/strong>\n* AMP-Validity: Strip CSS at-rules not allowed in <code>&lt;style amp-custom&gt;<\/code> (<code>@view-transition<\/code>, <code>@import<\/code>, <code>@charset<\/code>, <code>@namespace<\/code>, <code>@layer<\/code>), including when nested inside <code>@media<\/code> or <code>@supports<\/code>. Resolves the <code>@view-transition<\/code> error added by WordPress 7.0 global styles.\n* Resolved six IDE diagnostics in the theme-functions library (split a void\/echo helper, fixed an invalid component-method call, corrected several void-return assignments). No behaviour change.<\/p>\n\n<p><strong>Refactored<\/strong>\n* WPCS cleanup of the core, formatting, utility, and ad function files. No behaviour change.<\/p>\n\n<h4>1.7.9 - 2026-05-21<\/h4>\n\n<p><strong>Fixed<\/strong>\n* <code>Amp_WP_Html_Util::set_outer_HTML()<\/code> now replaces the target element in place instead of wiping surrounding markup. Fixes SoundCloud iframe embeds destroying sibling elements.<\/p>\n\n<p><strong>WordPress Compatibility (Compat)<\/strong>\n* Verified and declared WordPress 7.0 compatibility. Tested up to WordPress 7.0.<\/p>\n\n<p><strong>Refactored<\/strong>\n* PHPCS cleanup of the image, Instagram, Playbuzz, iframe, and carousel components plus the theme-functions library. No behaviour change.<\/p>\n\n<h4>1.7.8 - 2026-05-14<\/h4>\n\n<p><strong>Features<\/strong>\n* AdSense Auto Ads: AMP WP now emits the <code>&lt;amp-auto-ads type=\"adsense\"&gt;<\/code> body element automatically when \"Google Auto Ads\" is enabled, completing turnkey Auto Ads support. The publisher ID is auto-resolved from Google Site Kit, or supplied via the new <code>amp_wp_adsense_publisher_id<\/code> filter. New public functions <code>amp_wp_get_adsense_publisher_id()<\/code> and <code>amp_wp_render_auto_ads_element()<\/code>.<\/p>\n\n<p><strong>Fixed<\/strong>\n* AMP-Validity: Closes the \"extension amp-auto-ads is unused\" validator error on sites running Google Site Kit.<\/p>\n\n<h4>1.7.7 - 2026-05-14<\/h4>\n\n<p><strong>Features<\/strong>\n* New native \"Google Auto Ads\" toggle on Settings &gt; General. Enabling it enqueues the <code>amp-auto-ads<\/code> runtime loader via the canonical AMP component pipeline, so the script no longer needs to be pasted into the Customizer head-code field. Any manually pasted loader is auto-cleaned on save.<\/p>\n\n<p><strong>Fixed<\/strong>\n* AMP-Validity: The GDPR consent banner's EU country list inside <code>&lt;amp-geo&gt;<\/code> was emitted as a corrupted HTML-encoded string, causing the AMP runtime to reject the config and silently disable the geo-gated banner. It is now emitted as valid JSON.<\/p>\n\n<p><strong>Refactored<\/strong>\n* WPCS sweep of the Tez theme directory (37 files, 49 errors and 31 warnings down to zero) and removal of a dormant placement-manager file from core. No behaviour change.<\/p>\n\n<h4>1.7.6 - 2026-05-12<\/h4>\n\n<p><strong>Features<\/strong>\n* New \"Premium Extensions\" tab (hidden until at least one AMP WP family add-on is active) as a central home for add-on settings.\n* New public APIs <code>amp_wp_register_premium_extension()<\/code> and <code>amp_wp_register_template_path()<\/code> so family add-ons can self-register and ship their own AMP templates.\n* New extension hook <code>amp_wp_layout_setting_after_show_comments<\/code> for add-ons to extend the comment settings block.<\/p>\n\n<p><strong>Security<\/strong>\n* Comprehensive WPCS security sweep across the whole plugin: output escaping on every flagged echo\/printf, guarded and sanitized superglobal reads, and modern <code>phpcs:ignore<\/code> annotations. The escaping, nonce, and sanitize sniffs now report zero errors (down from 311). No behaviour change.<\/p>\n\n<p><strong>Fixed<\/strong>\n* <code>\/favicon.ico<\/code> and other root-level static-file requests on mobile no longer redirect to <code>\/&lt;file&gt;\/amp<\/code> and 404.\n* Search-engine crawlers are no longer caught by the mobile auto-redirect to AMP, fixing \"Redirect error\" rows in Google Search Console.\n* Pagination on AMP archives now works for every URL shape (e.g. <code>\/shop\/amp\/page\/2\/<\/code>).\n* The Premium Extensions tab icon now renders (was an empty glyph).<\/p>\n\n<p><strong>Improvements<\/strong>\n* Inline help text added across the Structured Data, GDPR, Notice Bar, Layout, General, and 3rd Party Plugins (OneSignal) settings tabs.<\/p>\n\n<h4>1.7.5 - 2026-05-07<\/h4>\n\n<p><strong>Fixed<\/strong>\n* Mobile browsers no longer get stuck in a \"too many redirects\" loop on AMP URLs after AMP-exclusion settings change. Plugin redirects now use <code>302<\/code> plus no-cache headers, with a one-shot <code>Clear-Site-Data<\/code> to recover clients holding a stale <code>301<\/code>.\n* <code>amp-state<\/code> elements are no longer stripped when the AMP WP Comments add-on is active.\n* Per-comment Reply links now appear on threaded AMP comment lists (WordPress 6.8), with the correct \"Reply\" label.\n* AFS Analytics configuration JSON was malformed and silently disabled analytics; now fixed.<\/p>\n\n<p><strong>Improvements<\/strong>\n* WPCS compliance for the redirect-router and public classes; same-origin redirects switched to <code>wp_safe_redirect()<\/code>. No public-API change.\n* New <code>tools\/test-redirects.sh<\/code> curl smoke harness for verifying redirect behaviour before release.<\/p>\n\n<h4>1.7.4 - 2026-05-01<\/h4>\n\n<p><strong>Fixed<\/strong>\n* The header and sidebar logo was silently stripped on every AMP page since v1.7.2 (a PHPCS escaping pass removed <code>&lt;amp-img&gt;<\/code> \/ <code>&lt;amp-anim&gt;<\/code>). A dedicated sanitizer now preserves the logo markup.\n* Notice Bar and GDPR Compliance no longer fail to appear due to an integer-vs-string comparison; several related Notice Bar and GDPR save\/validation bugs also fixed.<\/p>\n\n<p><strong>Improvements<\/strong>\n* The AMP WP editor meta box rebuilt with a professional toggle-switch UI, pinned to the top of the sidebar.<\/p>\n\n<h4>1.7.3 - 2026-04-30<\/h4>\n\n<p><strong>Fixed<\/strong>\n* Yoast SEO (v14+): meta description, Open Graph, and Twitter Card tags were silently missing on AMP pages; duplicate title\/robots tags and a 300-second front-page timeout also resolved.\n* All In One SEO Pack (v4+): missing meta\/OG\/Twitter tags and homepage title sync fixed.\n* WP-Optimize and WP Fastest Cache: HTML\/CSS minification and related features that ran unchecked on AMP pages are now correctly disabled.\n* OneSignal Web Push: the subscribe widget was never rendered on AMP pages; now fixed.\n* wpForo 3.x: AMP pages were incorrectly served on forum URLs; detection now uses <code>WPFORO_VERSION<\/code>.\n* JSON-LD structured data: schema type validated against an allow-list, ISO 8601 dates, integer interaction counts, and a guaranteed <code>image<\/code> fallback.<\/p>\n\n<p><strong>Improvements<\/strong>\n* Removed dead compatibility blocks for Multi Rating and verified Snip Rich Snippets compatibility.<\/p>\n\n<h4>1.7.2 - 2026-04-26<\/h4>\n\n<p><strong>Fixed<\/strong>\n* Google Analytics: GA4 (<code>G-XXXXXXXX<\/code>) IDs now use the correct <code>amp-analytics<\/code> tag, fixing the post-migration console warning.\n* JSON-LD: 11 Schema.org \/ Google Rich Results compliance issues resolved.\n* AdSense Auto Ads: corrected head-injection order so Auto Ads fire correctly.<\/p>\n\n<p><strong>Improvements<\/strong>\n* Upgraded Font Awesome from 4.7.0 to 6.7.2, eliminating console font warnings; existing icon classes are unchanged.\n* WPCS compliance in the template-functions and HTML-util files. No behaviour change.<\/p>\n\n<h4>1.7.1 - 2026-04-26<\/h4>\n\n<p><strong>Fixed<\/strong>\n* Admin Select2 CSS now scoped to AMP WP, preventing conflicts with ACF and other Select2-shipping plugins.\n* The \"Add Comment\" button is no longer hidden on posts with zero comments.\n* WP Rocket redirect loop on AMP-excluded URLs resolved; excluded URLs are pushed into WP Rocket's bypass list.\n* Polylang subdirectory language URLs (e.g. <code>\/uk\/category\/post\/amp\/<\/code>) no longer 404.\n* Fixed an \"Undefined array key\" nonce warning in the settings save handler.<\/p>\n\n<p><strong>Improvements<\/strong>\n* Add-ons tab card layout refined; plugin-compatibility class docblocks rewritten.\n* Removed compatibility for the closed WP Speed Grades Lite plugin.<\/p>\n\n<h4>1.7.0 - 2026-04-23<\/h4>\n\n<p><strong>Features<\/strong>\n* Add-ons tab now shows installed vs latest version for each premium add-on, with context-aware Download\/Update buttons. Latest versions are fetched from a public GitHub repo and cached for 12 hours; <code>?amp_refresh_versions=1<\/code> forces a refresh.\n* Full Help &amp; Documentation page replacing the placeholder.<\/p>\n\n<p><strong>Fixed<\/strong>\n* Activation redirect switched to <code>wp_safe_redirect()<\/code> plus <code>exit<\/code>.\n* <code>amp_wp_version_check_using_wpapi()<\/code> guarded against duplicate inclusion.\n* Fixed an undefined <code>$page<\/code> warning in the admin header.<\/p>\n\n<p>For the complete version history (1.6.0 and all earlier releases, in full detail), see the changelog.txt file included with the plugin.<\/p>","raw_excerpt":"The most complete free AMP plugin for WordPress. Supercharge mobile performance with Google Accelerated Mobile Pages, no coding required.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/90521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=90521"}],"author":[{"embeddable":true,"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pixelative"}],"wp:attachment":[{"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=90521"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=90521"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=90521"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=90521"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=90521"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/lt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=90521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}