[WordPress] 外掛分享: WP AdPosts by Kader Bouyakoub

首頁外掛目錄 › WP AdPosts by Kader Bouyakoub
10+
安裝啟用
尚無評分
3032 天前
最後更新
問題解決
WordPress 4.6+ PHP 5.2.4+ v1.3.0 上架:2018-03-04

內容簡介

WP AdPosts 外掛允許你使用代碼或圖片建立廣告,並提供瀏覽和點擊次數計數器,以及位置管理。你甚至可以使用提供的 shortcode 將廣告插入文章和頁面中。

管理廣告

你有兩種建立廣告的方法:

僅上傳特色圖片和提供的廣告連結。
貼上廣告代碼(JavaScript)或完整 HTML 代碼。

注意:如果使用完整 HTML 代碼,最好將廣告連結輸入到「廣告連結」欄位中。

為了在前端顯示廣告,你可以在主題檔案上使用提供的 PHP 函數,像這樣:

這裡的位置代表所建立位置的別名。例如你建立了一個頁首位置,可能有頁首的代稱,所以可以這麼做:

WP AdPosts 在文字 Widget 上啟用了 shortcode,因此您可以使用文字 Widget,在其中使用提供的 shortcode,像這樣:
[wp-adposts location=”header”]

使用位置作為函數的引數或 shortcode 的屬性,將顯示單個隨機挑選的廣告。

從版本 1.3.0 開始,可以通過廣告 ID 顯示特定的廣告,將其傳遞給主題檔案中的 PHP 函數,像這樣:

或像下面的示例一樣用作 shortcode 屬性:
[wp-adposts ad=”123″]

你應該知道的事情:

要按 ID 顯示廣告,請確保將其分配給一個位置,以便使用所選擇的尺寸顯示它。未分配位置的廣告將不會顯示。
首先選擇廣告 ID。因此,如果在 shortcode 中使用這兩個屬性,將使用廣告。如果找不到廣告,即使位置存在且已分配到廣告,也不會顯示任何東西。

管理位置

它們更像是「大小」限制。位置可以具有指定的廣告尺寸,以便將廣告包含在其中。例如,如果一個位置為 728 像素乘以 90 像素(728×90),那麼超出此範圍的任何內容都會被隱藏。

瀏覽和點擊次數計數器

你會看到在廣告管理頁面上的瀏覽和點擊次數計數器。這些對於監視廣告非常有用。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.3.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP AdPosts by Kader Bouyakoub」→ 直接安裝(推薦)

原文外掛簡介

WP AdPosts plugin allows you to create ads using codes or images and provides views and clicks counters, as well as locations management. You can even use the provided shortcode to insert ads into posts and pages.
Manage Ads
You have two ways of creating ads:

By uploading featured images only and provided ads links.
By pasting ads codes (JavaScript) or full HTML.

Note: If you use full HTML, it is better to enter your ads links into the “Ad Link” field.
In order to display an ad on your front-end, you can use the provided php function on your theme’s files like so:
Location here stands for the created location’s slug. So if you created a Header location, it may have the header slug, so you do:

WP AdPosts enabled shortcodes on text widgets, so you can as well use a text widget in which you can use this provided shortcode like so:
[wp-adposts location=”header”]
Using the location, as an argument for the function or an attribute for the shortcode, will display a single randomly picked ad to which it was assigned.
As of version 1.3.0, it is possible to display a specific ad by its ID, passed to the php function in your theme’s files like so:
Or used as shortcode attributes like the example below:
[wp-adposts ad=”123″]
THINGS YOU SHOULD KNOW:

To display an ad by its ID, make sure to assign a location to it in order to display it with the selected dimensions. Ads with no locations assigned will not be displayed.
Priority is to ad ID. So if you use both attributes in the shortcode, the ad will be used. If the ad is not found, even if the location exists and has ads assign to it, nothing will be displayed.

Manage Locations
They are much more like “sizes” limitations. A location can have a specified ads sizes so that ads will be contained in them. For instance, if a location has 728 pixles by 90 pixels (728×90), anything that is beyond that is simply hidden.
Views and Clicks Counters
You will see on ads management page views and clicks counters. These are useful to keep an eye on your ads.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon