Support » Fixing WordPress » Hide home link on homepage..

  • Hi
    I have made a theme using Starkers. I have an image above my navigation on my internal pages that links to the homepage. Prbably not the best way to do it, but it`s done.

    The problem im having is i really want to try and hide tht image on the homepage, to give some more contrast to the landing page. I have swapped my blog and homepages round in the settings, so i was wandering how thisd be possible. Here`s the code..

    I have tried the is_home() is_front_page() solution but cant seem to budge it.

    Warm regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • you can edit home.php in your theme folder which will be displayed as your home page and index.php which will be displayed everywhere else (and page.php for the static pages).

    Assuming I’m understanding correctly, you want to remove that bit of code on your static front page? Checking the current page with is_front_page like this should work:

    <?php if ( ! is_front_page() ) { ?>
    <div class="machines-banner"><a href=""><img src="<?php bloginfo('template_directory'); ?>/images/header-banner.png" title="home"</a></div>
    <?php } ?>

    It did.

    Many thanks big bagel!


    This has worked.

    But….I just looked at the site in IE8 and it has one of the rollover images for the top navigation hovering over the machines link on every page, apart from of course home, i reall don`t see why it should do this, it shows the image for the hover state of the link.

    Any suggestions?


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide home link on homepage..’ is closed to new replies.