Title: Taro Ad Fields
Author: TAROSKY INC.
Published: <strong>July 31, 2017</strong>
Last modified: April 23, 2025

---

Search plugins

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

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

# Taro Ad Fields

 By [TAROSKY INC.](https://profiles.wordpress.org/tarosky/)

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

 * [Details](https://ory.wordpress.org/plugins/taro-ad-fields/#description)
 * [Reviews](https://ory.wordpress.org/plugins/taro-ad-fields/#reviews)
 *  [Installation](https://ory.wordpress.org/plugins/taro-ad-fields/#installation)
 * [Development](https://ory.wordpress.org/plugins/taro-ad-fields/#developers)

 [Support](https://wordpress.org/support/plugin/taro-ad-fields/)

## Description

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).

## Installation

 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.

## FAQ

### 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.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Taro Ad Fields” is open source software. The following people have contributed 
to this plugin.

Contributors

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

“Taro Ad Fields” has been translated into 1 locale. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/taro-ad-fields/contributors)
for their contributions.

[Translate “Taro Ad Fields” into your language.](https://translate.wordpress.org/projects/wp-plugins/taro-ad-fields)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/taro-ad-fields/), check
out the [SVN repository](https://plugins.svn.wordpress.org/taro-ad-fields/), or 
subscribe to the [development log](https://plugins.trac.wordpress.org/log/taro-ad-fields/)
by [RSS](https://plugins.trac.wordpress.org/log/taro-ad-fields/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 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.

## Meta

 *  Version **1.3.5**
 *  Last updated **12 months ago**
 *  Active installations **10+**
 *  WordPress version ** 5.9 or higher **
 *  Tested up to **6.7.5**
 *  PHP version ** 7.4 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/taro-ad-fields/) and [Japanese](https://ja.wordpress.org/plugins/taro-ad-fields/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/taro-ad-fields)
 * Tag
 * [advertisement](https://ory.wordpress.org/plugins/tags/advertisement/)
 *  [Advanced View](https://ory.wordpress.org/plugins/taro-ad-fields/advanced/)

## Ratings

No reviews have been submitted yet.

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

[See all reviews](https://wordpress.org/support/plugin/taro-ad-fields/reviews/)

## Contributors

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

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/taro-ad-fields/)