Need help with basic WP php

Discussion in 'PHP' started by spleep1, Feb 1, 2009.

  1. #1
    Hi all,

    I have little to no php knowledge; so be kind :)

    Re: http://www.horseraceaustralia.com

    Basically my problem is that i only want the navigation (Pages) links in my L/H sidebar to appear on my HOMEPAGE; i don't want them to appear on any deeper pages on the site. For SEO/page flow/site architecture reasons.

    I've had a bit of a look around and think maybe i need a function with some rules like:

    <?php if (is_home()) { ?>
    <h1>Horse Race Australia</h1>
    <?php } else { ?>
    <h4><a href="/">Horse Race Australia</a></h4>
    <?php } ?>



    But like i said, i have no idea... and the above doesn't work.

    Any ideas would be GREATLY appreciated.

    Spleep :cool:
     
    spleep1, Feb 1, 2009 IP
  2. spleep1

    spleep1 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Geez ignore the php i put in there as an example!!!!!!!!!!!!!!

    I cut and pasted the wrong one........... that one was how to not have my HP H1, appear as the H1 on every page :p
     
    spleep1, Feb 1, 2009 IP
  3. yoavmatchulsky

    yoavmatchulsky Member

    Messages:
    57
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #3
    why ignore?
    its a good example.

    open sidebar.php and insert a is_home() check there, and do what you want on the homepage's sidebar..
     
    yoavmatchulsky, Feb 2, 2009 IP