Support » Fixing WordPress » php if code

  • Resolved jrcollins

    (@jrcollins)


    I’m trying to show the date on the front page of my website using the following code:

    <?php if(is_front_page()) ?>
      <p id="update"><?php the_date('M d Y'); ?></p>
    <?php endif ?>

    but I’m getting an “unexpected t_endif” error.
    Can someone who knows what they’re doing tell me what I’m doing wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php if code’ is closed to new replies.