This socument show how to implement tag on WordPress using plugin.
General ways are as followings;
- On the UI of WordPress, you can see the section named “Plugins>Add new” on the left side, then click on that section and Search for ”advertising-manager”
- Might find out ”Advertising Manager” by Scott Switzer
- Click “now install” button then the installation finished.
- Download the plugin zip file from WordPress plugin「Advertising Manager」
- On the UI of WordPress, you can see the section named ”Appearance>Edit” on the left side then, click on that section and select “Upload plugin”.
- Select the zip file, click button “Install now”
- • Download the plugin zip file from WordPressplug-in「Advertising Manager」.
- Upload the zip file on the “wp-contents/plugins” directory “wp-contents/plugins” which is installed via Wordpress
- Extract the zip file
On the UI of WordPress, you can see the section named ”Plugins>Installed plugins” on the left side then click on that section and activate “Advertising Manager”.
Add the code where you would like to make new ad spot by editing the theme.
Ex) After installation, many templates are shown on feed list at the initial stage. In this case, there are 3 templates as per belowl。
- Main index template (index.php)
- Search template (search.php)
- Archive template (archive.php)
- On the UI of WordPress, you can see the section named”Appearance>Edit” on the left side then click on that section and select the template that you would like to edit(
index.phporsearch.php、archive.phpetc...) - Add 2 code per details below
- Add the following code on the line just before the end of the loop
advman_ad('ADVS_xxx-' . (is_null($advs_xxx) ? ($advs_xxx = 1) : ++$advs_xxx));xxx: Set optional name depend on contents. Ex)index page =>ADVS_index- Can use Alphanumeric only for
xxx
- Add following code on the line after loop termination
advman_ad('ADVS_xxx');
- Add the following code on the line just before the end of the loop
- Press “Update File” button then finish to edit editing template
Sample:Adding the code on index template
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
advman_ad('ADVS_index-' . (is_null($advs_index) ? ($advs_index = 1) : ++$advs_index)); // ←Add this code.
// End the loop.
endwhile;
advman_ad('ADVS_index'); // ←Add this code.Create tag for template. It is necessary to make different templates on each media. Please refer here for the access of further details.
Sample: Tag for template
<div class="article">
<div class="icon">
<a href="{{click_url}}"><img src="{{main_image_url}}"></a>
</div>
<div class="contents">
<h3>{{title}}</h3>
<p>{{description}}</p>
<span class="source">Sponsored</span>
</div>
</div>Please refer here to know which placeholders you can use.
On the UI of WordPress, you can see the section named “plug in(Ads>Create new)” on the left side then click on that section and paste the following code then and import.
<script type="text/advs-instream-template" data-adspot-id="ad spot ID">
<!-- Paste the template that make in above section -->
</script>
<script src="//js.mtburn.com/advs-instream.js"></script>
<script>MTBADVS.InStream.Default.run();</script>- Paste the template in above section on the area
“Paste the template that make in above section”. When you would like to assign number of text, need to set in this point. Please refer here to know more detail. - Set ad spot ID that registered on admin UI on
ad spot ID.
After import, move"Edit Settings for HTML Ad"
- Change
HTMLtoADVS_xxx- Change
xxxto previousinput name. For the current example name isADVS_index.
- Change
- Fill in “1” on the box ” Account Details > Max Ads Per Page”
- Click “save” button and the registration completed.
On the UI of WordPress, you can see the section named “plug in(Ads>Create new)” on the left side then click on that section and paste the following code then and import.
<div data-advs-adspot-id="ad spot ID" style="display:none"></div>-Enter the ID that registered on admin UI on ad spot ID which is the same ID with ad template’s.。
After import, move"Edit Settings for HTML Ad"。
- Change
HTMLtoADVS_xxx-<ad display position>- Change
xxxto previous input name. The current sample name isADVS_index. - Enter only the integer on
<ad display position>. Note that the ads will be automatically displayed in the next below section
- Change
- Click “save” button and the registration completed
In case you would like to create more ad spots, please repeat the same instructions and procedures Set up the tag which assign ad placement again.
Setting is completed.
Check if infeed ad displayed on template section.







