Skip to:

Re: Help with an if/then statement

You do the same thing, but in different templates. If you look at the code, if $h2 is empty (ie. you didn’t tell it what to set) then it checks where it is – in a topic, in a forum, on a tag page or on the front page. But you can always tell it what to put instead. So if you want something else on a tag page, open the tag pages (tags.php, tag-single.php I think) in your template, look for <?php post_form(); ?> and change it to <?php post_form('No pizza for you!'); ?>. That’s a change that will happen only on the pages whose template you modified.

To add line breaks in HTML you use <br />. But I’m not sure you can have that inside an <h2> element. You can probably just put that right above the <?php post_form(); ?>, like so:

<br />
<br />
<?php post_form('Macaroni Cheese'); ?>

Skip to toolbar