Post image for 10 WordPress hacks to make more money online

10 WordPress hacks to make more money online

by Jean-Baptiste Jung on November 8, 2009 · 50 comments

WordPress is a very powerful blogging engine, which serve content to billions of readers on a daily basis. But not only: WordPress can be used in a wide variety of ways: Photoblog, online magazine, classified site… And with all that power, WordPress can also help you to make more money online than a simple site or a blogger blog.

In this article, I’m going to show you 10 powerful and easy to implement WordPress hacks to make more money online.

Insert ads in your RSS feed

RSS feeds are the new newsletters. Everyday, more and more people use RSS to access content from their favorite websites, so what about monetitizing yours?
Simply paste the following code on the functions.php file from your theme. Create that file if it doesn’t exists by default.
Once saved, ads should be displayed on your blog RSS feed!

function insertRss($content) {
    if(is_feed()){
        $content = 'text before content'.$content.'<hr /><a href="http://www.wprecipes.com">Did you visited WpRecipes today?</a><hr />';
    }
    return $content;
}
add_filter('the_content', 'insertRss');

Source : http://www.webinventif.fr/wordpress-ajouter-du-contenu-dans-son-flux/


Display ads to search engines visitors only

It is a well known fact in the world of internet marketing that people coming to your site from search engines have more chances to click on your ads than your regular visitors.
In order to avoid AdSense “Smart Pricing”, you should definitely only display your ads to visitors coming from search engines.

To do so, we first have to create a function. Paste the code below in your theme functions.php file.

function scratch99_fromasearchengine(){
  $ref = $_SERVER['HTTP_REFERER'];
  $SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
  foreach ($SE as $source) {
    if (strpos($ref,$source)!==false) return true;
  }
  return false;
}

The $SE array is where you specify search engines. You can easily ad new search engines by adding new elements to the array.

Then, paste the following code anywhere on your template where you want your ads to be displayed only to visitors comming from SERPs.

if (function_exists('scratch99_fromasearchengine')) {
  if (scratch99_fromasearchengine()) {
    INSERT YOUR CODE HERE
  }
}

Source : http://www.wprecipes.com/how-to-display-adsense-to-search-engines-visitors-only


Make your title tag SEO friendly

I recently talked about the benefits of having an optimized <title> tag. After the theory, let’s dive into the practice.

Open your header.php file for edition. find the <title> tag, and replace it by the following:

<title>
<?php if (is_home () ) {
    bloginfo('name');
} elseif ( is_category() ) {
    single_cat_title(); echo ' - ' ; bloginfo('name');
} elseif (is_single() ) {
    single_post_title();
} elseif (is_page() ) {
    bloginfo('name'); echo ': '; single_post_title();
} else {
    wp_title('',true);
} ?>
</title>

This code will generate SEO optimized title tags according to the following model:

  • If the visitor is on the blog homepage: We’ll display the blog name.
  • If the visitor is on a category page: We’ll display the category name and the blog name.
  • If the visitor is on an article page: We’ll only display the article title.
  • If the visitor is on a static page: We’ll display the blog name, and the page title.

Note that if you’re, like me, using the super cool Thesis WordPress theme, you don’t need to implement that hack. Thesis do it by default!
Source : http://www.wprecipes.com/how-to-make-your-title-tag-seo-friendly


Allow your visitors to send your posts by email

Althought I personnally almost never send “Your should visit that page” emails to my family or friends, lots of Internet users are doing it.

This is definitely a good thing for website owners, because it bring new visitors, and they can become regular readers. This is the reason why you should implement this pretty nice function to allow your visitors to send your blog posts by email.

Paste the following function to your functions.php file.That’s all. Hard to do something simpler ;)

function direct_email($text="Envoyer par mail"){
        global $post;
        $title = htmlspecialchars($post->post_title);
        $subject = 'Sur '.htmlspecialchars(get_bloginfo('name')).' : '.$title;
        $body = 'Je recommande cette page : '.$title.'. Consultable à cette adresse : '.get_permalink($post->ID);
        //$body .= '. Extrait: '.$post->post_excerpt; // http://www.webinventif.fr/wordpress-hors-boucle/
        $link = '<a rel="nofollow" href="mailto:?subject='.rawurlencode($subject).'&amp;body='.rawurlencode($body).'" title="'.$text.' : '.$title.'">'.$text.'</a>';
        return $link;
}

Source : http://www.webinventif.fr/wordpress-lien-envoyer-page-mail/


Automatically insert content after each post

On most blogs, bloggers ad some stuff after the post content: Advertisments, related posts or these “Subscribe to RSS feed” boxes.
Whatever you want to display, this solution is pretty good for that. Sure, you can “simply” edit your theme single.php file, but using this method, your message will stay even if you switch themes.
One more time, you just have to paste the function into the functions.php file eused by your theme.

function insertFootNote($content) {
        if(!is_feed() && !is_home()) {
                $content.= "<div class='subscribe'>";
                $content.= "<h4>Enjoyed this article?</h4>";
                $content.= "<p>Subscribe to our  <a href='http://feeds2.feedburner.com/WpRecipes'>RSS feed</a> and never miss a recipe!</p>";
                $content.= "</div>";
        }
        return $content;
}
add_filter ('the_content', 'insertFootNote');

Source : http://www.wprecipes.com/how-to-automatically-insert-content-after-each-post


Display a Tweetmeme “Retweet” buton where, and when you want

Tweetmeme have a pretty cool service which allow people to share your blog post on Twitter. If you don’t already pay a lot of attention to Twitter, you have to know that it is know one of the bigger traffic provider on my blogs, as well as on very popular ones as such as Mashable or Smashing Magazine.

This hack is very easy to implement. You just have to copy the following code, and paste it into your function.php file.

function tweetmeme(){
	return '<div class="tweetmeme"><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div>';
}
add_shortcode('tweet', 'tweetmeme');

Once done, you can display the Tweetmeme “retweet” button anywhere on your posts. In WordPress editor, make sure you are in HTML mode and insert the following:

[tweet]

Source : http://www.wprecipes.com/wordpress-tip-create-a-tweetmeme-retweeet-shortcode


Detect IE6 (And open popups!)

If you’re a Cats Who Code reader, there no doubt that you know how much I hate Internet Explorer 6.
But as an Internet marketer, IE6 also have good points : As an obsolete browser, some of its versions do not have any anti pop-up blockers. Which means that you can do a real pop-up fiesta to each of your beloved IE6 users and make some money.

After all, as a profesionnal web developer IE6 was the cause of many headaches and night work. So, it is worth a pop up or two (or more).

To implement this hack, just open your header.php file and paste the following.

<!--[if lte IE 6]>
   <!-- insert your ad script here -->
<![endif]-->



Cloak affiliate links

Whenever you talk about any kind of products on your blog as such as WordPress themes, hosting, or even plane tickets, there’s for sure some affiliate link to grab in order to make some money.
But some people, who wants to make money too, will join the same affiliate programs and sign in using their own link, instead of yours. And as you probably know, in the world of affiliate marketing, most of the time it is the first clicked link who’ll bring money to the site owner, so you have to “hide” your affiliate links.

You can do it using various method: A simple url shortener, a plugin as such as Redirection (I use it on all my blogs) or even a dedicated free service named aCloaker.


Display Adsense with a shortcode

Adsense is hard. On some pages, clicks can make you earn $2, while they are just $0.10 on some other. To optimize your Adsense earnings, you should definitely implement Adsense only when you want to.
This nifty hack will allow you to do it easily.

One more time, you have to open your functions.php file and paste the following code in it. Remember to change the Adsense code, or my ads will be displayed instead of yours!

function showads() {
    return '<script type="text/javascript"><!--
    google_ad_client = "pub-3637220125174754";
    google_ad_slot = "4668915978";
    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('adsense', 'showads');

Once you inserted the code and saved your functions.php file, you’ll be able to embed your adsense code on your posts and display it exactly where you want. To do so, simply paste the following code on the editor, in html mode:

[adsense]

Source : http://www.catswhoblog.com/how-to-display-adsense-ads-only-when-you-want-to


(Try to) block AdBlock

If you want to get info from a book, you have to buy the book and read it. With blogs, you can access millions of interesting pages for free. Bloggers don’t want people to pay for their content, because advertisment is bringing their income.

Sadly, some people who don’t understand that if a blogger don’t make enought money with blogs, he’ll have to take a daily job and stop blogging. Some nasty people who want to access info without giving anything back created a Firefox plugin named AdBlock. Its purpose is to block ads, which is definitely a bad thing for our businesses.

To implement this hack, you have to embed all your ads within a specific css class. It is called myTestAd in this example:

<div class="myTestAd" style=" text-align:center;margin:10px">
    <!-- advert code goes here -->
</div>

Once done, we have to verify that the iframe element doesn’t have a height of 0. Using MooTools, we can come up with that code:

Window.onDomReady(TestPage);

function TestPage() {
    if ($E(".myTestAd iframe").clientHeight == 0)
        alert("You are blocking my ads, you swine!");
}

Source : http://www.thepcspy.com/read/how_to_block_adblock

That’s all for today! Hope you’ll make lots of $$$ with my hacks ;) Happy blogging everyone!

WPShift

{ 22 trackbacks }

Tutorial: Mehr Werbeumsatz durch Wordpre… | Wordpress Lesezeichen
November 9, 2009 at 12:02 pm
uberVU - social comments
November 9, 2009 at 12:07 pm
ajf7688 Blog - 10 WordPress hacks to make more money online
November 9, 2009 at 2:05 pm
10 WordPress hacks to make more money online » Viz vaz
November 9, 2009 at 2:39 pm
10 WordPress hacks to make more money online :All Productz Marketing & Information
November 9, 2009 at 3:51 pm
Introducing CatsWhoBlog.com
November 9, 2009 at 5:00 pm
Bill Giltner's Online Marketing Blog » 10 WordPress hacks to make more money online
November 9, 2009 at 5:39 pm
10 WordPress hacks to make more money online | Neorack Tutorials
November 9, 2009 at 5:41 pm
10 WordPress hacks to make more money online
November 9, 2009 at 5:58 pm
HowToMakeMoneyOnline.Co.Tv - 10 WordPress hacks to make more money online | How To Make Money Online
November 9, 2009 at 6:05 pm
10 WordPress hacks to make more money online « Money Maker
November 9, 2009 at 6:58 pm
Introducing CatsWhoBlog.com | Programming Blog
November 9, 2009 at 7:55 pm
Work At Home Business Opportunities Weblog | 10 WordPress Hacks To Help You Make Money
November 9, 2009 at 10:33 pm
You are now listed on FAQPAL
November 9, 2009 at 10:47 pm
Vote on this article at blogengage.com
November 9, 2009 at 10:48 pm
10 WordPress hacks to make more money online | www.kotihost.com
November 10, 2009 at 4:26 am
Tommy k Johanssons blogg om datorer & Internet
November 12, 2009 at 8:57 am
{GoGoGo} » Blog Archive » 10 WordPress hacks to make more money online
November 12, 2009 at 9:35 pm
BlogBuzz November 14, 2009
November 14, 2009 at 12:07 pm
How to monetize your old blog posts
December 2, 2009 at 3:04 pm
Introducing CatsWhoBlog.com | Programming Blog
December 5, 2009 at 10:09 pm
10 WordPress hacks to make more money online « Site Optimizer
January 8, 2010 at 5:54 pm

{ 28 comments… read them below or add one }

1 Corey Freeman November 9, 2009 at 12:06 pm

Awesome post! Thanks for the pointers!

As far as URL cloaking goes, I use pretty link pro. There is a free version that has much of the same functionality, but pretty link pro also has social media integration built in.

2 Jean-Baptiste Jung November 9, 2009 at 12:43 pm

@Corey Freeman : Glad you enjoyed it! Never heard of pretty link pro, I’ll have to check it out :)

3 Paul Olyslager November 9, 2009 at 5:29 pm

Some really useful hacks in here. I’ve just tested out the “Display ads to search engines visitors only” but that doesn’t work for me. It has something to do with the WP Super Cache plugin i’m using. For the moment I’m looking for a javascript solution, let you know if I found one!
cheers

4 quicoto November 9, 2009 at 5:36 pm

Do you have any stats to proof the “Allow your visitors to send your posts by email” ?

I really don’t think anybody is using this.

5 kylegetsspam November 9, 2009 at 6:01 pm

If any site tries to stop my Adblock from working it will get Noscript’d as well.

For your consideration: The types of people who run Adblock will never click on any of your ads even if you did somehow get around their beloved extensions. Especially if they’re useless third-party crap or Adsense.

Unwanted invasive bullshit is what prompted the development of these types of extensions in the first place.

6 Jean-Baptiste Jung November 9, 2009 at 6:18 pm

@Paul Olyslager : yes, it doesn’t work with Wp Super cache, sadly.

@ kylegetsspam : The “useless third party ads” are what allow lots of blogger to work and publish articles FOR FREE over the internet.
What do you prefer: paying to get knowledge, or get free knowledge, paid by advertisments?
I know ads can be annoying, that why I’ll never use popups or stuff like that on my sites, I have too much respect for my readers. But Adsense/BSA/etc aren’t that annoying, and they are worth FREE articles.

@quicoto : The good thing with list is that you can pick up what you like and leave what you dieslike. So if you don’t think this hack is useful, just don’t implement it ;)
Hope you liked the rest a little more ;)

7 quicoto November 9, 2009 at 6:54 pm

@Jean: Yep the rest was great but im used to see sites using “send to friend” and I don’t understand :)

8 redwall_hp November 9, 2009 at 6:55 pm

@ kylegetsspam : The “useless third party ads” are what allow lots of blogger to work and publish articles FOR FREE over the internet.
What do you prefer: paying to get knowledge, or get free knowledge, paid by advertisments?
I know ads can be annoying, that why I’ll never use popups or stuff like that on my sites, I have too much respect for my readers. But Adsense/BSA/etc aren’t that annoying, and they are worth FREE articles.

Agreed. I’m not too worried about people blocking AdSense, as it’s primarily PPC, and people running AdBlock aren’t the sort who click ads. (It actually might help your CTR.) But I do have a serious problem about people blocking (reasonable) banners such as BSA’s. Banners are oriented more towards page impressions, and AdBlock really can hit you in the wallet as a result.

If any site tries to stop my Adblock from working it will get Noscript’d as well.

Then we very well may move on to the last resort of blocking your access to the sites server-side with PHP. No ads, no free content.

9 Jean-Baptiste Jung November 9, 2009 at 7:11 pm

@quicoto : I do not use it either :) Just thought it could interest some of my readers ;)

@redwall_hp : 100% with you.

10 Harsh Agrawal November 9, 2009 at 7:15 pm

Great tips here Jean.. Though for cloaking I will suggest use Gocodes wordpress plugin. Simple and powerful.. It adds more value as you can change the Affiliate link with one click

11 Design Informer November 9, 2009 at 10:30 pm

Great! We all want to make more money.

12 redwall_hp November 10, 2009 at 2:27 am

@Harsh Agrawal I recommend GoCodes as well, as I developed it. :)

13 Dave Doolin November 10, 2009 at 8:00 am

That email hack is a no brainer. I recall I use that all the time when it’s available.

Ads are fine. Why people everything has to be free is totally beyond me. I give so much stuff away, 10s of thousands of lines on sourceforge dot alone, that anyone telling me I should not display ads or charge for content can just go away. I don’t want them around.

BTW, well-executed popups convert like crazy. I’ll be putting a really good one back on my site soon.

14 BebopDesigner November 10, 2009 at 6:32 pm

Now this is handy! Thanks for sharing.

15 Hameedullah Khan November 11, 2009 at 10:34 am

I like most of the ideas except the IE6 popup thing, because I don’t want my visitors to get irritated by the popup. If I don’t like it for myself why would I will show it up for someone else. So popups is certainly not a good idea.

16 Hameedullah Khan November 11, 2009 at 10:35 am

Sorry, forgot to subscribe to comment via e-mail.

17 Jean-Baptiste Jung November 11, 2009 at 11:56 am

@Hameedullah Khan : In my opinion, people who use IE6 are hurting the web because of their outdated browser. So, when a browser don’t protect you from pop-ups, there’s no worry to show pop up to theses visitors.
Of course I’ll never display popups to respectable visitors ;)

18 sebounet November 12, 2009 at 11:13 pm

Thanks for this.

19 Mike Meisner November 14, 2009 at 3:33 am

Hey man great post. You might want to check my write up on a little “hack” to deliver targeted ads to your site’s visitors. In other words, if you have posts with the category of “hosting”, you might want to put a little blurb pushing your hosting affiliate. You can modify the CSS and make it much less obtrusive than my glaringly ugly example:

mikemeisner.com/deliver-targeted-ads-to-visitors-using-wordpress

20 Edgar Marca November 20, 2009 at 9:18 am

Really helpful information. I’m new in the world of Wordpress. Now with these snippets I can see the flexibility of Wordpress. Thanks

21 denbagus November 25, 2009 at 3:35 pm

amazing trick….i will use in my blog.thank you

22 epunk November 28, 2009 at 12:28 am

thx but for block adblock you can test this :)

epunk.fr/26/bloquer-adblock/

23 Jean-Baptiste Jung November 28, 2009 at 9:28 am

@epunk : I’ll have a try, thanks!

24 Beau December 2, 2009 at 9:14 pm

Very informative, everyone should be using these tricks!

25 GraphicDesignBay December 2, 2009 at 9:28 pm

Nice Article. Really helpfull. I will use in my blog specially the detect IE and Automatically insert content after each post.
Thank
GraphicDesignBay.com

26 NetKit December 10, 2009 at 11:00 pm

Very useful stuff, thanks for sharing

27 Nihar January 1, 2010 at 9:26 pm

Great wordpress hacks. Thanks for sharing it.

I will use adsense shortcode to insert the ads.

28 cismorov January 2, 2010 at 6:33 pm

great post, thx, i will use them when i have more visitors :)

Leave a Comment

Previous post:

Next post: