- Start a FTP program and connect to your wordpress website
- Locate your funtions.php (wp-content\themes\theme_name\functions.php)
- Edit the file and put the following code in your functions.php file:
- Modify the client, slot, width and height values
- Safe the file and overwrite the current
function showads() { return ' <script type="text/javascript"><!-- google_ad_client = "ca-pub-3134535021136249"; google_ad_slot = "3483719222"; google_ad_width = 468; google_ad_height = 60; // --> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> ';} add_shortcode('banner', 'showads');
Now you can use the [banner] tag in your post to publish the banner:
[banner]