Hide home link on homepage.. (5 posts)

  1. Maracas1970
    Posted 4 years ago #

    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

  2. netcs.vg
    Posted 4 years ago #

    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).

  3. Big Bagel
    Posted 4 years ago #

    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="http://www.gotodesigns.co.uk/"><img src="<?php bloginfo('template_directory'); ?>/images/header-banner.png" title="home"</a></div>
    <?php } ?>
  4. Maracas1970
    Posted 4 years ago #

    It did.

    Many thanks big bagel!


  5. Maracas1970
    Posted 4 years ago #

    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?


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.