Ad just on homepage

Discussion in 'Programming' started by amomslove, Dec 4, 2009.

  1. #1
    I have a wordpress blog on my site and a client wants to post an ad in sidebar (sidebar is a widget)...but they want it to just be just on my homepage. What code do I add to the link?:confused:
     
    amomslove, Dec 4, 2009 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    Do you mean the ad will be jast only on your homepage?
     
    s_ruben, Dec 4, 2009 IP
  3. amomslove

    amomslove Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, the person does not want to be thruout the site...anything I place in my sidebar goes throughout the site.
     
    amomslove, Dec 4, 2009 IP
  4. windy

    windy Active Member

    Messages:
    1,093
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #4
    edit the sidebar.php code , edit the line of code to check if is home before the ad code....
     
    windy, Dec 4, 2009 IP
  5. aap

    aap Well-Known Member

    Messages:
    1,802
    Likes Received:
    39
    Best Answers:
    2
    Trophy Points:
    120
    #5
    use code like this in sidebar.php of the theme you are using.

    
    <?php if (is_home()) { ?>
    YOUR ADVERTISEMENT CODE
    <?php } ?>
    
    PHP:
     
    aap, Dec 4, 2009 IP
  6. amomslove

    amomslove Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I added what you said but it does not show up..the first link is one of the other links that goes thru the whole site (i changed the link for privacy on here) and second is what you suggested using google:

    <p align=center><a href="http://www.aaaaa.com">Free </a>
    <p align=center>
    <?php if (is_home()) { ?><a href="http://www.google.com">Google</a><?php } ?>
     
    amomslove, Dec 5, 2009 IP
  7. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #7
    Can you explain in more details what do you want from Wordpress??
     
    s_ruben, Dec 5, 2009 IP
  8. aap

    aap Well-Known Member

    Messages:
    1,802
    Likes Received:
    39
    Best Answers:
    2
    Trophy Points:
    120
    #8
    its working on my wordpress theme. Please check again.
     
    aap, Dec 5, 2009 IP
  9. adservermods

    adservermods Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Hi,
    Will be able to do this as we have good developer with our team.

    Here is some of our work experiences in PHP for your reference,

    Some of our Ecommerce work experiences,

    www.essum.com
    http://www.gpreneur.com/os_template/osc/

    Some of our General projects work includes,
    www.oaktreeidea.com
    www.fotorax.com
    http://thefatpig.com
    http://countryfayre.co.uk/

    Please provide us more details, You can contact us at,

    Yahoo ID –

    MSN Id -

    Google Talk –


    We will be looking forward from you.
    Regards
     
    adservermods, Dec 8, 2009 IP