WordPress Integration

WordPress Integration


WordPress is a free and open-source content management system (CMS) that is used by nearly 30% of the top 10 million web sites. It is no doubt a great CMS with a vibrant community and tons of plugins to customize it for many different purposes. However, its visual HTML editor while it makes creating content easy for mere mortals does have an unfortunate tendency to eat or mangle JavaScript codes such as ad tags.

The Solution

To avoid this problem you simply should not insert JavaScript ad tags into pages, posts or widgets using the WordPress visual editor. Rather you should use a WordPress shortcode for your ad tags instead. Not to worry though because there is an excellent plugin for WordPress that makes this a piece of cake: EmbedIt Pro


At the current time of this writing the most recent version of WordPress is version 4.6.1 and this is the version we will be using in these instructions. We will be using version 1.11 of the EmbedIt Pro plugin. Do not mind that the WordPress site says this plugin is potentially out of date -- it does in fact work with the latest version as you will see.

First go to the EmbedIt Pro plugin page on the WordPress site and download it.

Next you will want to log in to the WordPress admin and navigate to the Plugins menu.

WordPress Plugins Menu

Click on the Upload Plugin button and select the embedit-pro.1.11.zip file from your computer.

Upload Plugin

Click on Install Now button as shown above and then click on the Activate Plugin link once it has been installed successfully.

Activate Plugin

Plugin Usage

Now you should see there is a new HTML Snippets menu and you can click on Add New to create a new snippet as shown below.

WordPress Snippet Editor

As you can see we named the snippet 300x250, pasted in the JavaScript ad tag and then it gave us the following WordPress shortcode:

[embedit snippet="300x250"]

This shortcode can now be inserted into any post or page as shown in the following screenshots:

Shortcode Usage

Shortcode Usage

The plugin also comes with an HTML Snippet widget, which is great for including ads in your sidebar as shown in the following screenshot:

Snippet Widget

Closing Thoughts

As you have learned the EmbedIt Pro plugin allows a simple and seamless integration of AdvertServe tags into WordPress posts, pages and widgets. It is also perfectly fine in certain cases to insert ad tags directly into the PHP template files for your Wordpress theme. However, this should be reserved for cases where a shortcode cannot be used. In general you want to limit modifications to your theme templates as it complicates upgrading your theme to newer versions.

← Switching to HTTPS
Google Search and Google Chrome Changes →