• Resolved ladydelaluna

    (@ladydelaluna)


    Okay, I’ve checked the forums and the codex, and came up with something like this:

    <?php if (is_home()) { ?>
    <br /><a href="https://www.linktomysite.com">Link Text</a>
    <?php } ?>

    To put in the footer, so that this only shows up when the visitor is on the home page (which is home.php)

    But… it’s not working.

    I’m trying to make it so that MY link shows up in the footer only on that home page (it’s the web dev credit link) and not across the whole site…

    I’ve searched the codex, read the conditional tags page, gone to PHP tutorial sites, and I’m lost…

    What am I missing?

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter ladydelaluna

    (@ladydelaluna)

    got some help from chait – thanks dave!

    this had to do with some custom queries in the home.php file that had to be tinkered with…

    i’m now sure that had the home.php file been “normal” that either one of the above solutions would’ve worked properly.

    thanks jwurster and stefan for your help!

    dannybcastillo

    (@dannybcastillo)

    Thanks for this post.

    This was my outcome. I needed a link in my main nav to disappear when a visitor travels to single or category view.


    <?php if ( is_home() || is_page() ) : ?>
    <a href="#ASI_navigation"
    title="Go to Addition Source of Information Section">
    Asi
    <?php endif // is_home() || is_page() ?>

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘footer: only show a line when on home.php’ is closed to new replies.