Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using a custom field plugin called Advanced Custom Fields to create custom fields, but i don't think that's what's causing the problem.

When i fetch the custom fields from a template using get_post_custom(), the

tags in the field is removed. If i view the source, it's written out like a big chunk of text but with "normal" line breaks, but that's not visible unless you view the source ofc.

How do fetch the custom fields and keep the

tags? I tried adding a tag around some text and that went fine, no issues displaying it. It's just

tags, grr.

Any ideas?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Advanced custom fields plugin has it's own set of functions to use, use them instead. Also text fields there have an option of weather to save HTML or pure text

http://www.advancedcustomfields.com/docs/

They also have nice examples if you go to the documentation of the particular field type

share|improve this answer
    
That's fancy, didn't know! get_field() and the_field() both seem to work, thanks Mridul! –  qwerty Oct 17 '12 at 11:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.