get_post_custom interfered by post tags (This is an odd one!)
-
Having an odd problem…
Using this code to fetch a custom meta value only when one is present almost works for me:
if (get_post_custom()) { $quote = get_post_meta($post->ID, 'quote', true); echo "<div class=\"quote\">$quote</div>"; }
The almost is this:
If a post has a tag, but not a custom meta value (the $quote) it shows the div container. If a post doesn’t have tags and no meta value no div shows up (as I want it).As long as the $quote is defined it doesn’t seem to matter whether or not the post is tagged…
What is going on?? What does the post tags have to do with custom meta values?!? *scratches head, utterly confused*
I’d surely like som input on this one, it’s making my brain itch. ??
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘get_post_custom interfered by post tags (This is an odd one!)’ is closed to new replies.