WordPress.org

Ready to get started?Download WordPress

Forums

Hide home link on homepage.. (5 posts)

  1. Maracas1970
    Member
    Posted 2 years ago #

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

    http://pastebin.com/qsZFZbvg

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

    Warm regards

  2. netcs.vg
    Member
    Posted 2 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
    Member
    Posted 2 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
    Member
    Posted 2 years ago #

    It did.

    Many thanks big bagel!

    Maracas

  5. Maracas1970
    Member
    Posted 2 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.

    http://www.gotodesigns.co.uk

    Any suggestions?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.