
內容簡介
Monetize Me 是一款輕量級且開發者友好的廣告管理外掛,專為 WordPress 設計。它讓使用者能夠管理廣告、使用分類法組織廣告,並透過短碼、PHP 函數、小工具或 Gutenberg 區塊動態顯示廣告。
【主要功能】
• 自訂廣告文章類型
• 支援廣告分類與贊助商的分類法
• 使用短碼、PHP 函數、小工具顯示廣告
• 支援多站點功能,集中管理廣告
• 隨機顯示廣告按類別/群組
• 輕量且可擴展的架構
外掛標籤
開發者團隊
原文外掛簡介
Monetize Me is a lightweight and developer-friendly advertisement management plugin for WordPress. It allows you to manage ads, organize them using taxonomies, and display them dynamically using shortcodes, PHP functions, widgets, or Gutenberg blocks.
The plugin is optimized for WordPress Multisite, enabling Network Administrators to centrally manage and synchronize taxonomy terms (adcategory, adsponsor) and Ad posts across subsites.
Core Features
Custom Post Type for Ads
Taxonomies:
Ad Categories (adcategory)
Ad Sponsors (adsponsor)
Display ads using:
Shortcodes
PHP functions
Widgets
Gutenberg block
Raw editor output for advertisement snippets without automatic
tag injection
Provider-managed ad-code rendering without plugin-controlled JavaScript initialization or delayed execution
Enqueued frontend styles that keep responsive ad containers full-width, with optional alignment classes controlled by the shortcode, block, or widget
Random ad display by category/group
Lightweight and extensible architecture
Admin-only Ad CPT management using plugin-specific capabilities
Multisite Features
When network activated:
Dedicated Network Admin settings page
Copy taxonomy terms across subsites
Copy all ad CPT posts from one site to one or more selected subsites
Preserve Ad post title, slug, content, excerpt, status, menu order, custom fields, and assigned Monetize Me taxonomy terms
Duplicate-safe copying using slug-based detection
Summary report showing copied, skipped, and failed counts
Usage
Shortcode Usage
The main shortcode is:
[mmps]
Supported attributes:
id
Display one specific ad by post slug.
adcategory
Either a single slug of ad Category or CSV IDs of Ad Category.
adsponsor
A sponsor slug, comma-separated term IDs, comma-separated slugs, or a mixed comma-separated list of IDs and slugs.
limit
Number of ads to display. Default: 1
wrapper
Wrap each ad in
< div class=”ad-wrapper”>. Accepts 1 or 0. Default: 1
class
Optional alignment or styling class for the outer wrapper. No alignment class is added by default.
Shortcode examples
Display a specific ad by ad slug:
[mmps id=”homepage-leaderboard”]
Display one random ad from category ID 12:
[mmps adcategory=”12″]
Display one random ad from the ad category with the slug “in-article-ad”:
[mmps adcategory=”in-article-ad”]
Display two random ads from category ID 12:
[mmps adcategory=”12″ limit=”2″]
Display ads from category 12 and sponsor 3:
[mmps adcategory=”12″ adsponsor=”3″]
Display ads from a sponsor slug:
[mmps adsponsor=”adsense”]
Display ads from multiple sponsor IDs or slugs:
[mmps adsponsor=”3,7,adsense”]
Display an ad without wrapper markup:
[mmps id=”sidebar-ad-1″ wrapper=”0″]
Center an ad explicitly when required:
[mmps id=”homepage-leaderboard” adAlignment=”center-align”]
Raw Ad Code Usage
For Google AdSense or other third-party advertisement snippets, paste the provider code into an Ad post using a Custom HTML block or the code editor. Monetize Me renders the ad content without wpautop(), so the saved markup is not wrapped in extra paragraph tags.
Monetize Me does not initialize, delay, rewrite, or remove third-party advertising JavaScript. The complete advertisement snippet saved in the Ad post is printed on the frontend as supplied. Include any required provider loader and initialization code in the saved snippet or load shared scripts separately through the website.
PHP Usage
'homepage' ) ); ?>
Multisite Term Synchronization
Go to Network Admin → Settings → Monetize Me.
In Copy Ad Taxonomy Terms, select the source site.
Select the destination subsite.
Click Copy Terms to Selected Subsite.
The plugin will:
Copy adcategory terms
Copy adsponsor terms
Skip duplicate terms by slug
Multisite Ad Post Synchronization
Go to Network Admin → Settings → Monetize Me.
In Copy Ads, select the source site.
Select one or more destination subsites.
Click Copy Ads to Selected Subsites.
The plugin will:
Copy all posts of the ad custom post type
Skip destination Ad posts with the same slug
Copy custom fields
Copy and assign adcategory and adsponsor terms by slug
Report copied, skipped, and failed counts
License
This plugin is licensed under the GPLv2 or later.
