Now You Can Download Google Chrome OS for Free!
 

Chitika Tips: Targeted Chitika Ads in WordPress

Filed in: Chitika Tips, Make Money Online — October 14th, 2005

advertisement

ChitikaWe know that we cannot have contextual ads in Chitika because it against Google Adsense TOS. We discusssed about non-contextual Chitika ads by insert few keywords. I also told you about totally random Chitika ads.

But, you may still want to decide which product to be shown in Chitika ads for every different article? Let me show you.

This Chitika tip is for WordPress user only. The code is based on Jacken’s Blog – add targeted ads from Chitika in WordPress. It is a great tip but I found that it is rather confusing. Therefore, I write my own version.

Wait! There is Chitika WordPress plugin!

As far as I know, there are two Chitika eMiniMalls wordpress plugins available: [CA]Chitika, eminimalls plugin. They are great if you want to insert Chitika ads inside content.

However, since I do not put Chitika ads in the content, they are not helpful to me. I want to put Chitika ads outside the content, yet I still want to control what product it shows. Okay, here is my wordpress hacks for targetted Chitika ads in Wordpress.

Hack WordPress for targeted Chitika ads

  1. Open and edit “single.php” of your wordpress template.
  2. Locate your Chitika ads code. Add the following PHP codes above the Chitika ads code:
    [php]
    < ?php
    $adkey = get_post_meta($post->ID, “ad”, FALSE);
    srand(time());
    $adrnd = rand(0,count($adkey) – 1);
    ?>[/php]
  3. In your Chitika ads code, replace the “ch_query” line with the following code:
    [html]ch_query = “< ?php echo $adkey[$adrnd]; ?>“;[/html]
  4. At the end, your Chitika ads code should look something similar like this:
    [php]
    < ?php
    $adkey = get_post_meta($post->ID, “ad”, FALSE);
    srand(time());
    $adrnd = rand(0,count($adkey) – 1);
    ?>

    [/php]

    Note: the code must be inserted after line:
    [php]< ?php if (have_posts()) : while (have_posts()) : the_post(); ?>[/php]
  5. Save and upload “single.php” back to your server.

Okay. The hardest part is done. :)

Now, you can add custome field when you edit a wordpress post (under Advance Editing panel). Use “ad” (without double quotations) as the key, and the product keyword as value. Here I use “Internet Marketing” as the keyword for the Chitika ads in the article.

wordpress custom fields

You may insert multiple “ad” key with differrent values. They will be randomly selected as Chitika ads keyword. Or, if you do not add any keyword, the Chitika ads will show a randomly selected product.

Thought

With the hack, you may have the Chitika ads almost any place in the template (not limited to inside post content) but still control their keywords. I hope you find this wordpress hack useful.

In my opinion, Chitika eMiniMalls ads is best performance in product review website. It is for visitors who visit the website to look for product information. For other website, I think we need to find out which product pay most…

Sign up Chitika* and start earning money from your website. Make sure you also check out my other useful Chitika tips & tricks.

*The link is a referer link. You will do NOT lose any cent by sign up via the link, but you will HELP me to get small referer revenue. Thank you.

[tags]chitika[/tags]

Read also:

  • nice tips, liew

    but actually, you can use my plugin ([CA] Chitika) to put chitika ads outside the content and control the keyword from the costum field :)

    maybe I'll write about it later
  • LcF
    is it? I wait for your documentation then. :)
  • ehsan
    thx alottttttttttttttt
    i search over 3 days to find your hot hack trick man!!!!!!!!!!
    Great Job!
    sweet clever boy;)
  • You are the man!

    This is exactly what I've been looking for. As you said it works on other templates as well, not limited to single.php
blog comments powered by Disqus