• Resolved travismc

    (@travismc)


    Sooo, first of all, props to an amazing community. WordPress really is incredible, and its online following/community is even more so.

    I’ve been using wordpress for a long time, but just recently started developing for it.

    My question is this:

    I’m currently developing a new theme based off of darren hoyt’s gravy framework.

    In the loop, I find this near the very beginning of the loop.

    “<h1 class=”posttitle”><?php the_title(); ?></h1>”

    I want this to continue to work, but to not work on the static front page of my site as set in wordpress.

    I think I can use “is_front_page()” as a conditional tag for this, but, I’m not sure about the exact way to do it.

    I’m thinking I need something like “<h1 class=”posttitle”><?php !is_front_page() the_title(); ?></h1>

    Where !is_front_page() means “is not front page”

    Essentially, I want to post the title on everypage except the frontpage….I’m sure this is simple, but I’m having difficulty figuring it out.

    any help is greatly appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • <h1 class=posttitle'>
    <?php if (!is_front_page()) {
       the_title();
    }
    ?>
    </h1>

    I believe

    Thread Starter travismc

    (@travismc)

    Hrmmm, tried that code, didn’t work. Odd. I’m still confused…seems so simple…

    <?php if ( is_front_page()) {
          echo '';
    } else {
          the_title();
    }
    ?>

    Maybe? Not sure what’s up with the previous…..

    Thread Starter travismc

    (@travismc)

    Hmm, tried that too, still not working, I appreciate the attempt though!

    Thread Starter travismc

    (@travismc)

    Oh wow. I’m sorry, turns out I was wrong. The first bit of code you posted works and fixed my issue, thanks!

    I was editing the wrong loop.php file

    Much appreciated!!! Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Setting the loop to not display the page title on the static home page’ is closed to new replies.