A WordPress plugin that adds AMP-FX Flying Carpet ads functionality to the AMPforWP plugin. Displays ads (such as Google AdSense) inside a fixed-height container that creates a "flying carpet" scroll effect, increasing Click Through Rate (CTR) on AMP-optimized blogs.
| Feature | Description |
|---|---|
| Flying Carpet Ads | AMP-FX animation that displays ad content in a scroll-triggered container |
| Google AdSense Support | Place your AdSense ad ID directly through the plugin editor |
| No Core Modifications | Works as a standalone plugin without modifying AMPforWP core files |
| Ready to Use | Install, set your ad ID, and the ads are live |
| Google AMP Compliant | Follows Google's AMP-FX documentation guidelines |
| Category | Technology |
|---|---|
| Backend | PHP (WordPress Plugin) |
| AMP Component | AMP-FX (Flying Carpet) |
| Dependency | AMPforWP (required) |
- WordPress 5.0+
- AMPforWP plugin installed and activated
- Download or clone the plugin:
git clone https://github.com/rifqimulyawan/rm-amp-custom-ads.git-
Copy the
rm-amp-custom-adsfolder to your WordPresswp-content/plugins/directory -
Activate the plugin in WordPress Admin → Plugins
-
Edit the plugin file (
rm-amp-custom-ads.php) to add your Google AdSense ad ID -
Your Flying Carpet ads are now live on AMP pages
The Flying Carpet effect uses AMP-FX to display the ad inside a container at a fixed height. As the user scrolls through the page, it appears like a flying carpet opening up its contents and sliding across as if peeking through a window on the page.
This creates an engaging ad experience that can significantly increase CTR on AMP-optimized websites.
rm-amp-custom-ads/
├── rm-amp-custom-ads.php # Main plugin file (ad configuration + rendering)
└── README.md
This plugin follows Google's AMP-FX Flying Carpet documentation. No need to worry about breaking Google's rules — the Flying Carpet component is an official AMP feature.
This project is open source and available under the MIT License. Free to use for your entire website.
Rifqi Mulyawan — rifqimulyawan.com