Advertisements are an essential part of modern marketing and can be seen in the header, footer, sidebar, and even in the content of virtually every website there is. Inserting banners onto your WordPress site via an affiliate program is a good way to earn some money from your blogging efforts. Okay, the returns are generally modest, but every cent counts and adding banners is a very simple process so it’s definitely worth doing.
Almost all of the websites providing banners will also supply you with code for installation. All you will need to do is choose where you would like the banner to be placed. This guide will help you through the process.
Adding a banner to a sidebar
The sidebar is probably the most common place to find a banner, and adding an advertisement on the left or right column of your site is easy to do.
First, log in to your WordPress dashboard (yourwebsite.com/wp-admin) and go to Appearance > Widgets. Locate the “Text” widget and drag it over to the side bar, placing it wherever you choose to.
Open the “Text” widget and paste the banner code into the large box. A title for your text is optional, but is probably best left blank. Click on the blue “Save” button and the banner will be displayed on your site.
Adding a banner to a page or post
Adding a banner to a page or single post is also a good way to attract some clicks and does not take anything away from the content. To do this go to Posts > All Posts or Pages > All Pages (select Add New for new posts and pages), click on “Edit” and select the “Text” tab. “Text” will display your content in HTML mode, and you will simply need to paste the banner code for the ad to appear between paragraphs.
To place the banner above a post you will need to go to Appearance > Editor, locate either the single.php (posts) or page.php (page) file and paste the banner code after the following line of code:
<?php while ( have_posts() ) : the_post(); ?>
Adding banners to footers and headers
The method of adding a banner to the footer or header of your WordPress site will depend on the type of theme you are using. Some premium themes have widget areas for headers and footer, whereby the method of adding a banner is the same as placing the advertisement in the sidebar. Most free themes, though, do not offer customizable headers and footers, which means the site code will need to be edited accordingly.
Go to Appearance > Editor and locate either the header.php or footer.php file. From here, find the opening of the body tag and insert the following code directly after it:
<div><a href="URL" target="_blank"><img src="IMAGE LINK" width="200" height="50" /></a></div>
Where the code says “URL” you should replace with the link for the banner website and “IMAGE LINK” should be replaced with the link to the image. Style.css can be used to change the width and height of the banner, as you desire.