get_post_custom stripping styling issue

If the line breaks exist in the database, you just need to run your custom field output through wpautop().

Changes double line-breaks in the text into HTML paragraphs (<p>...</p>).

If that doesn’t work, then the line breaks probably are getting stripped before going into the database. In that case you’ll need to share the code that saves the custom field to the database.

Leave a Comment