Reputation: 4711
Trying this: - UPDATE -- SOOORRY!
<li><a href="index.php" class="first">Home</a></li>
<?php
if (the_title() == "language-translation")
print("<li><a href='become-a-volunteer'>Become a Volunteer</a></li>");
?>
<li><a href="#"><?php the_title(); ?></a></li>
All I get is the TEXT ('Become a volunteer') and not the LI item...(or the anchor for that matter) ? -- Forgive me but I pasted a mistake.. this is STILL not working above.
I get the TEXT regardless of whether the if is true or not and never get the LI and A
Upvotes: 0
Views: 149
Reputation: 479
try
if (the_title() == "language-translation") ?>
reason it doesnt work is because you ended PHP before you enter print (a PHP command)
Upvotes: 2
Reputation: 785
You are closing the PHP tag at the end of the if statement. Remove the end "?>"
if (the_title() == "language-translation") ?>
Upvotes: 6