Personal Development for Smart People Forums

Personal Development for Smart PeopleTM Forums

 

Go Back   Personal Development for Smart People Forums > Personal Development > Technology & Technical Skills

Notices

Technology & Technical Skills Computer skills, hardware, software, internet topics, gadgets, programming

Reply
 
Thread Tools Display Modes
Old 08-06-2008, 08:29 PM   #1 (permalink)
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  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2008, 04:10 PM   #2 (permalink)
Member
 
Join Date: Jun 2008
Posts: 74
simonsta is on a distinguished road
Default

It seems you're using Wordpress so you can use the IsHome function to test if the page is the home page in your script, and put that in your sidebar page in your theme. Google IsHome for more details!
simonsta is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO: Remove the annoying sidebar on the forums TechnoGuyRob Technology & Technical Skills 15 09-30-2011 02:27 PM
Blog at homepage or in .com/blog/ folder? Your thoughts? Holistic Star Technology & Technical Skills 6 11-06-2007 07:55 PM
Grr, my wordpress sidebar menu dropped down Cassie Technology & Technical Skills 4 02-19-2007 11:43 PM
What's your homepage? Athena Technology & Technical Skills 41 02-15-2007 06:49 AM


All times are GMT. The time now is 05:07 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2010 by Pavlina LLC