Parsing a custom field inside a conditional sentence
-
Hi,
I would like insert 2 custom fields named “titleline” and “titleline2” in a H1 tag inside a conditional sentence.
I’ve read the Codex information but I’m not sure how to put the custom field there.Here is the code I’m using:
<?php if (is_home() ) { echo '<h1> <span>Text here </span> Second line of text here </h1>' ;} else { echo '<h1><span>Custom Field HERE</span> Custom field2 HERE</h1>' ;} ?>
Thank you!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Parsing a custom field inside a conditional sentence’ is closed to new replies.