Archive for the ‘Demo’ Category

Test

Monday, July 9th, 2007

This is a test to see if I got ads out of the feeds.

This is a test to see what happens to various kontera span tags when I use the “more” tag.
(more…)

Don’t lose Money: Hide the Sponsored Tag!

Wednesday, June 13th, 2007

Want to make more money with sponsored posts?

Remember, I told you how to remove the Kontera ads automatically from sponsored ads by editing your WordPress template? Editing the template lets you conveniently run Kontera ads on a blog runs sponsored ads. But, to use that trick, you need to create a “Sponsored” category.

Some advertisers won’t let you show the post is sponsored, which means you can’t let that category display on that sponsored post.

So, what’s a gal to do? Edit her template some more!

My knitting blog, which has been accepted in PayPerPost, used to show every tag including the “Sponsored” tag. But I changed that by looking up the appropriate WordPress template tags and coding a bit of logic to suppress display of the “Sponsored” category in a list of tags.

Below, you’ll find PHP code to create a string of tags that omits the category ‘Demo’ (rather than ‘Sponsored’); the tags will display this way:

/* ========Code to omit 'Demo' from listed tags. ========
You can edit three lines.

Edit your links to match your categories.
For the purpose of demonstrating this, I won't show tags called "Demo".
*/
$preCatName='‘;
$omitTag=”Demo”;
// don’t edit below this.

$tagString=”Tags: “;
$iFirst=0;

foreach((get_the_category()) as $cat) {
if($cat->cat_name !=$omitTag ) {
if(0<$iFirst) $tagString .=', ';
$catName = $cat->cat_name;
$tagString .= $preCatName.”. strtolower($catName).”. $postCatName.”.$catName .’
‘;
$iFirst++;
}
}
$tagString .=’.';
if(0<$iFirst){ echo($tagString);}
// ========== End listing tags without 'Demo'.
?>

If you compare these tags to the ones running at the top of my post, you’ll see the ‘Demo’ tag is gone. Beauty!

Here’s the code (comment in blue):
<?php
/*

Edit three lines.
My categories look like this:
<a href="http://www.yourblog.com/blog/category/cat_name/" rel="category tag"> 
For the purpose of demonstrating this, I won't show tags called "Demo".

*/
$preCatName='<a href="http://www.yourblog.com/blog/category/';
$postCatName='" rel="category tag">';
$omitTag="Demo";
// don't edit below this.

$tagString="Tags: ";
$iFirst=0;

foreach((get_the_category()) as $cat) {   
if($cat->cat_name !=$omitTag ) {  

if(0<$iFirst) $tagString.=', ';
$catName = $cat->cat_name;
$tagString.=$preCatName.''.strtolower($catName).''.$postCatName.''.$catName.'</a>';
$iFirst++;
}
}
$tagString .='.';
if(0<$iFirst){ echo($tagString);}
?>



Use this in your WordPress template and make more money!