Support » Themes and Templates » php syntax help

  • Resolved heidipj

    (@heidipj)


    Hi there,

    I am trying to do an if else in php but it’s not working… Can someone take a quick look and tell me what I am doing wrong? What I’m trying to do: if post ID is not equal to 27 (id of homepage) then show post title.

    <?php if ( the_ID()!=27 ) { ?>
    <h2><?php the_title(); ?></h2>
    <?php } ?>

    any help would be much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘php syntax help’ is closed to new replies.