How To Create ShortCode To Insert Ad In The Post WordPress

To insert the ad in the article you can use WordPress shortcode. Lately, I often discuss Google Adsense advertising program. This plugin is required to use, to place an ad in WordPress posts with ease.

In the past, I once created a plugin to place ads in posts automatically. I still use that plugin until now, but it is less flexible. With a shortcode plugin to insert Adsense ads in the middle of the post, I hope your passive income increases.

How To Create ShortCode To Insert Ad In The Post WordPress

Create ShortCode WordPress To Insert Ad In The Post

I’m not just sharing plugins to show ads, but will also provide tutorials on how to build this plugin.

  1. Create a plugin folder with the name sgt_ads_shortcode.
  2. Create a PHP file in the sgt_ads_shortcode folder named sgt_ads_shortcode.php.
  3. Create a plugin header with the following code in the sgt_ads_shortcode.php file.
  4. Add the following main code under the plugin header code

Save. Then compress the sgt_ads_shortcode folder with zip format. If you have finished, please install this plugin. If it has been installed, please add your ad script on the shortcode ads menu. In this plugin, I only provide four input box to accommodate your ad code. The display “shortcode ads menu” like the following picture:

Easy way put ad in the middle post with shortcode plugin

How To Use Ad ShortCode Plugin

To display ads on post use the following shortcode in your article

example to show first ad code in the right position

example to show second ad code in the center position

example to show third ad code in the left position

Plugins aim to show ads in the middle of posting in a flexible way. This plugin is still far from perfect. I hope so that your passive income from AdSense increases. To support your passive income, please read Key To Success With Adsense – Tips and Strategy tutorial.

To download the plugin, please go to the following link

Thus my article how to put ads in the post with shortcode.

The following two tabs change content below.
This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Leave a Comment

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.