Title: Taro Ad Fields
Author: TAROSKY INC.
Published: <strong>2017 年 7 月 31 日</strong>
Last modified: 2025 年 4 月 23 日

---

搜尋外掛

![](https://ps.w.org/taro-ad-fields/assets/banner-772x250.png?rev=3110801)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/taro-ad-fields/assets/icon-256x256.png?rev=3110801)

# Taro Ad Fields

 由 [TAROSKY INC.](https://profiles.wordpress.org/tarosky/) 開發

[下載](https://downloads.wordpress.org/plugin/taro-ad-fields.1.3.5.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/taro-ad-fields/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/taro-ad-fields/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/taro-ad-fields/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/taro-ad-fields/#developers)

 [技術支援](https://wordpress.org/support/plugin/taro-ad-fields/)

## 外掛說明

You can create ad slot for you WordPress theme.
 In each position, the latest ad
field will be displayed. You can manage your advertisement’s schedule & display!

#### From Theme

Call action hook in your theme:

    ```
    <?php do_action( 'taro_ad_field', 'after-header', '<div class="after-header">', '</div>', 3 ); ?>
    ```

In this place, the latest 3 ads will be displayed.
 With [Taro Clockwork Post](https://wordpress.org/plugins/taro-clockwork-post/)
plugin, you can let your ad be automatically expired.

Hook Arguments

    ```
    do_action( $hook_name, $slug, $before, $after, $number );>
    ```

 1. **$hook_name**: The action hook name. Always should be `taro_ad_field`.
 2. **$slug**: Slug of position.
 3. **$before**: String to be output just before ad block. If no ad exists, this won’t
    be displayed.
 4. **$after**: String to be output just after ad block.
 5. **$number**: Number of ad to be displayed. Default is 1.
 6. **$contexts**: Array of contexts. Context is a taxonomy that filters ads. For more
    details, see our [Wiki](https://github.com/tarosky/taro-ad-fields/wiki).

#### From Widget

We also have widget for ad field. The latest ad of specified position will be displayed
in the widget.

#### Set Default Positions

In your theme, add filter hook for `taf_default_positions`.
 These terms will be
created automatically.

    ```
    add_filter( 'taf_default_positions', function() {
        return [
            'after-header' => [
                'name' => 'After Header',
                'description' => 'Displayed just after header.',
            ],
            'after-content' => [
                'name' => 'After Content',
                'description' => 'Displayed just after content.',
                'mode' => 'iframe',
            ],
        ];
    } );
    ```

Defaults are empty array, so no default position.
 You can add new position to them
with filter hook like above. The structure of array will be like below:

    ```
    [
      'slug_name' => [
        'name'        => 'Verbose Position Name',
        'description' => 'About where will be displayed(up to you)',
        'mode'        => 'iframe',
      ],
    ]
    ```

If you set mode as ‘iframe’, this position will have URL and display ad in very 
simple HTML pages.
 You can get URL from view link in position list of admin screen.

This feature is useful to deliver ad in external platform like [Facebook Instant Article](https://instantarticles.fb.com).

## 安裝方式

 1. Upload the plugin files to the `/wp-content/plugins/taro-ad-fields` directory, 
    or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress
 3. Go to `Ad Field > Position` and create positons. If you set default positions with
    filters, they will be automatically generated.
 4. Register ad posions. The published fields will be displayed.

## 常見問題集

### Do you have detailed documentaiton?

Please check our [Wiki](https://github.com/tarosky/taro-ad-fields/wiki). English
and Japanese documentations are available.

### How to Contribute

We host our code on [Github](https://github.com/tarosky/taro-ad-fields), so feel
free to send PR or issues.

### Is there any vulnerability?

As far as we know, **NO**. But nothing is perfect.
 This plugin allows you to save
Javascript like Google Adsense code, so please be careful about who can edit your
ad. You can customize the capability for ad fields by hooking `taf_post_type_args`
filter.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Taro Ad Fields〉的開發相關工作。

參與者

 *   [ TAROSKY INC. ](https://profiles.wordpress.org/tarosky/)
 *   [ Fumiki Takahashi ](https://profiles.wordpress.org/takahashi_fumiki/)
 *   [ yocchi161 ](https://profiles.wordpress.org/yocchi161/)

〈Taro Ad Fields〉外掛目前已有 1 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/taro-ad-fields/contributors)
為這個外掛做出的貢獻。

[將〈Taro Ad Fields〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/taro-ad-fields)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/taro-ad-fields/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/taro-ad-fields/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/taro-ad-fields/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/taro-ad-fields/)。

## 變更記錄

#### 1.3.2

 * Add context feature.

#### 1.2.6

 * Add filter hook for widget rendering.

#### 1.2.5

 * Allow multiple ad in one field.

#### 1.1.0

 * Add iframe feature. Now you can provide ad field as iframe ad container. e.g.
   Facebook Instant Article.

#### 1.0.0

 * First Release.

## 中繼資料

 *  版本 **1.3.5**
 *  最後更新 **1 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 5.9 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.7.5**
 *  PHP 版本需求 ** 7.4 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/taro-ad-fields/) 及 [Japanese](https://ja.wordpress.org/plugins/taro-ad-fields/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/taro-ad-fields)
 * 標籤:
 * [advertisement](https://tw.wordpress.org/plugins/tags/advertisement/)
 *  [進階檢視](https://tw.wordpress.org/plugins/taro-ad-fields/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/taro-ad-fields/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/taro-ad-fields/reviews/)

## 參與者

 *   [ TAROSKY INC. ](https://profiles.wordpress.org/tarosky/)
 *   [ Fumiki Takahashi ](https://profiles.wordpress.org/takahashi_fumiki/)
 *   [ yocchi161 ](https://profiles.wordpress.org/yocchi161/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/taro-ad-fields/)