'Include HTML tags in custom fields
I have a "currently reading" custom field in my WordPress blog post, and I want to output it wrapped in an HTML tag.
What I tried was this hack:
echo "<h1>" . $mycustomfieldcontent . "</h1>";
What the client prefers to do is to be able to set the HTML in the actual custom field.
What would be the proper way to do that?
Solution 1:[1]
You're close. Pretty much the same as your previous question, see the screenshots:
Add your Custom Field with HTML in it.

Then display it with this:
<?php echo get_post_meta($post->ID, 'Your Meta Key', true); ?>
And the output should be:

Solution 2:[2]
This also works, in case you're not using 'get_post_meta()'
<?php echo html_entity_decode($custom_field_content); ?>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | 00-BBB |
