• Resolved databell96

    (@databell96)


    I’m trying to get a large chuck on code on my footer only to appear on the homepage. Nowhere else. I tried a number of different methods. None of which worked at all. Here’s one of the examples I’ve been using in a condensed format:

    `<footer id=”colophon” class=”site-footer” role=”contentinfo”>
    <?php if ( is_home || is_front_page() ); ?>
    <div id=”footer-tabs”>
    </div><!– #footer-tabs –>
    <?php ?>

    So whatever appears inside of footer-tabs should only appear on the homepage. So why isn’t this working?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think what you want is this:

    <footer id="colophon" class="site-footer" role="contentinfo">
    <?php if ( is_home() || is_front_page() ) : ?>
       <div id="footer-tabs">
       </div><!-- #footer-tabs -->
    <?php endif; ?>
    Thread Starter databell96

    (@databell96)

    Yes, that was the trick. Thank so much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can't get is_home || is_front_page to work on my theme’ is closed to new replies.