Days
Hours
Minutes
Seconds

New Year Sale is here!
40% off on Everything for a very limited time

Claim The Offer Now

Create Custom AdSense Positions

Sometimes you want to create specific advert positions in your theme like having an advert in your footer or header of your page.

To do so you can either make use of shortcodes which you can paste directly into your theme template files in corresponding place or you can create a fixed ad spot and register the ad directly into WP QUADS. The second option gives you more flexibility as it allows you to change the content of the ad directly from WP QUADS settings.

Option 1 – Using a (PHP) Shortcode

You can enter AdSense code under the tab WP QUADS -> AdSense Code. There you also find the name of the shortcode of an ad. Copy and paste that code into your theme template file in place where you want it to appear.

For example, if you want to add an ad to the header of your website you open the file wp-content/themes/yourtheme/header.php and add the php shortcode  at the place you want the ad appearing, e.g.
<?php echo do_shortcode('

'); ?>

Common theme files are:

  • header.php – The top of your website incl. logo
  • footer.php – The bottom of your website
  • archive.php / category.php – A list of posts
  • page.php – The page single page template
  • single.php – The blog single post template

Ask your theme developer if you are unsure about the correct template file name.

Option 2- Register an Ad Spot

To register a fixed place in your theme which you can control via WP QUADS just copy and paste the following code into your functions.php (You find that file in the main theme folder)

You can modify the value of location and description to your need but make sure that location must be a single word and must not contain any special or space character.

Next open your desired theme files.
In this example we want to place an ad into the header and footer of our site so we are going to edit the files footer.php and header.php.

Use the code below and place it where you want to show a custom WP QUADS ad position on your web site. Here we use the header ad spot.

After reloading you can control the new ad position from from your WP QUADS global settings:

adsense_ad_spots

Powered by BetterDocs