How to add an "if" statement to this?
-
In the index file of my template, the line I want to mod is:
<h1 id=”post-<?php the_ID(); ?>”><?php the_title(); ?></h1>
I want to add an “if” statement so that if the_title() (the title of the page) is “Home”, then not to display it.
I’ve tried a test line as:
<?php $pagetitle = the_title(); if ($pagetitle != “Home” ) {the_title();} ?>But that didn’t work :/ It just displays the page title 2x no matter the page. I suck ??
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to add an "if" statement to this?’ is closed to new replies.