If you are not completely new to browsing WordPress blogs, you have probably noticed that some blogs contain advertisements inside their site content. If you have ever wondered how they put ads inside their WordPress blogs, you need not worry about it anymore. Today, I am going to show you a couple of ways of including ads in your blog content.
There are few of us who include ad content inside their blog posts manually. This is a highly inefficient way of including ads, since every time you need to put a different ad in place of the previous one you need to do it from scratch.
The easiest way of inserting ads into your blog content is to use a plugin. There are many plugins available for this purpose, but the one we are going to use today is Insert Post Ads. You may search for it from your WordPress dashboard or download it from the website.
Once you install the plugin, a new menu titled Post Adverts will appear on your dashboard. To create your first ad using this plugin, click on Post Adverts > Add New. A new screen will appear similar to the following image. [NEED IMAGE]
At the top of the new page, there is a box asking for the name of your ad. This is to help you identify your ad later. The next box is titled as “Advert Code”. This is where you need to put your ad code in order to generate the ad section on your blog page.
The Display the advert box provides you with three options – Before Content, After Paragraph Number and After Content. If you want the ad to appear at the top of your blog content or below it, select Before Content and After Content respectively.
If you want to include your ad inside the blog content, select After Paragraph Number. There is an additional box allowing you to select the paragraph number you want to display your ad after. Select the appropriate number and hit the Publish button on the right hand side. If you have done everything correctly, your ad should appear on your blog page now.
Additionally, you may customize this plugin setting by clicking on Post Adverts > Settings from your dashboard. On the Settings page, you can select where you want this ad to appear.
If you want to display the ad only on your posts, check the Posts box and leave the Pages box unchecked. If you want to do the opposite, leave the Pages box checked with Posts box unchecked.
The Display Styling section is there to help the developers with their site styling. By default, the Insert Post Ads plugin comes with some styling that is applied to the ad section. But if you are a developer and decide to get rid of this default styling, simply check the Exclude CSS box. Once you have completed your customization, don’t forget to hit ‘Save Settings’ button.
Well, I’ve talked about the easiest way of including ads so far, but some of you might not like the idea of using a plugin for this purpose. For that reason, I am going to present a simple code snippet here.
Go to your theme directory and find the functions.php file. Open this file and paste in the code below:
Now, you need to insert your ad code inside this snippet. Simply replace the Advert code goes here text with your ad code and save the file. Now the advertisement will appear on every Single Post content of your WordPress site.
Well, this is it for today. I have covered the basics of inserting ads into your blog content. If you have any further questions, please don't forget to leave a comment below.