I have a WordPress blog where i write reviews on different products and services ranging from web hosting, gadgets, mobile phones to digital cameras. Iam currently planning to setup affiliate links and banners in my blog because now i have got excellent traffic who visit my blog daily searching for reviews and i want some kind of setup in which i can display different advertisements for each category on my blog. Is there any possibility for this kind of system like any paid wordpress plugin or any php codes etc. Question by Ranjith who runs a high ranking wordpress based blog.
Solution : WordPress is one of the most flexible Content Management System which can be used to develop a blog, shopping portal, jobs portal to a static looking website. Overall you can customize it in anyway by just finding the right links which can help you in setting this up. You can use different plugins in wordpress in order to show the advertisements on different locations of your blog but there seems to be no plugin which can help you in showing different ads on different categories.
Hence, its recommended to tweak into the Category Function of WordPress and tweak it so that you can show ads on different sections. Located at – http://codex.wordpress.org/Template_Tags/in_category , you can get a code as follows :
This wordpress function is going to use the if function and search for the Category ID and display the advertisement whenever found. You just need to add the ad code in between the following code and then add the whole code in your theme files.
<?php if ( in_category('category_id') ): ?>
// Your Category Specific Ad Code here
<?php endif; ?>
This way you can display content or category related advertisements on your blog instead of running the same ads on the whole blog. Do check out a similar article which can help you in showing ads on homepage of wordpress blogs. Let us know if you have any other queries regarding this.
As far as the ad content goes – have you looked into Google Ad Planner ?
I have just started setting mine up today, so I can’t tell you much about it yet – just that it seems to look promising.
Thanks, I’ll start doing it, from now on..
now this one is very useful! I should try this…
Will there be any difference if we show ads based on categories? I tried this once but never noticed a change.
thank you very much..just looking for the same.
btw I was wondering if there is any plugin which could help me targeting adverts country-wise.