How to print some text if a custom field matches a specific value
-
Hi friendly forum people,
I’m trying to do something that’s probably quite simple but my knowledge of PHP doesn’t allow me to figure it out yet.
For a particular single post template, I need to check if a specific custom field matches a specific value. For instance: if the custom field called “state” matches the value “florida” then print the word “south” instead of displaying the custom field value. And if the custom field called “state” matches the value “vermont” then print the word “north.”
Thanks for any help you’re able to provide, I really appreciate it! I was surprised that I wasn’t able to find a quick answer on Google.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to print some text if a custom field matches a specific value’ is closed to new replies.