Problem With Custom Fields
-
I’ve simply added a custom field called “description_heading” with a value of “Find and rate agents now.”
However, When I go into the template and add:
<p class="description_heading"> <?php echo get_post_meta($post->ID, 'description_heading', true); ?> </p>
Nothing is displayed. I plugged in an arbitrary “Print this” in front of the echo and it displayed in the template so it is something with the get_post_meta call that isn’t working. Am I missing something? Not sure what the problem is.
On another note, I have another install that is version 3.3.2 and the same code is working just fine, although it is in a different theme. Not sure that would matter but it is 3.4 where I’m having the problem.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problem With Custom Fields’ is closed to new replies.