RM AMP Custom Ads
WordPress AMP plugin for AMP-FX Flying Carpet ads with Google AdSense support
by Rifqi Mulyawan · github.com/rifqimulyawan/rm-amp-custom-ads · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/rifqimulyawan/rm-amp-custom-ads/archive/refs/heads/master.zipRM AMP Custom Ads — WordPress AMP Plugin
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.
Features
| 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 |
Tech Stack
| Category | Technology |
|---|---|
| Backend | PHP (WordPress Plugin) |
| AMP Component | AMP-FX (Flying Carpet) |
| Dependency | AMPforWP (required) |
Installation
Prerequisites
- WordPress 5.0+
- AMPforWP plugin installed and activated
Setup
-
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
How It Works
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.
Project Structure
rm-amp-custom-ads/
├── rm-amp-custom-ads.php # Main plugin file (ad configuration + rendering)
└── README.md
Compliance
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.
License
This project is open source and available under the MIT License. Free to use for your entire website.
Developer
Rifqi Mulyawan — rifqimulyawan.com