View Single Post
Old 08-06-2008, 08:29 PM   #1 (permalink)
Cassie
Senior Member
 
Join Date: Nov 2006
Location: New York
Posts: 212
Cassie is on a distinguished road
Default Having Ad Appear In Sidebar Only On Homepage

An advertiser approached me to throw a text link up in my sidebar at Broke-Ass Student.

I put the link into a sidebar widget, but he emailed me yesterday requesting that the link appear only on the homepage instead of site wide. I have no idea how to do this and dug around online to see if I could find a code;

<?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
AD CODE HERE
<?php } ?>

I tried the above code in my sidebar widget (didn't work) and also tried inserting the code into my sidebar.php in the theme editor, which also didn't work. The ad is still displaying site wide in my sidebar.

I'm not sure if I have the right code and might just be inserting it in the wrong area. Can anyone advise?
Cassie is offline   Reply With Quote