How to Insert Google Ads in Your WordPress Post Using Shortcode

Aside from putting ads on sidebars, header and footer. Including ads inside your post will help on increasing revenue from Google Ads. This is the easiest way to have that ads on your post without installing any plugins.

Here are the steps on how to insert Google Ads in your WordPress post using shortcode

Step1: Go to Appearance – > Editor in your admin panel

Step 2: Select your current Theme’s Functions.php

Step 3: Copy and paste this code to your functions.php

function adshow() {
return '</pre>
<div id="adshow"> PLACE YOUR ADSENSE CODE HERE </div>
<pre>
';
}
add_shortcode('ads', 'adshow');

Step 4: replace the text “PLACE YOUR ADSENSE CODE” with your actual Adsense code and save.

Step 5: Use [ads] shortcode for placing ads to your post. Enjoy!

By |2018-04-10T10:50:58+00:00December 30th, 2013|How To's, Tutorials, Web Designing, Websites|