I am using the latest version of Options Framework (which is found here: http://wordpress.org/extend/plugins/options-framework/) on the latest build of WordPress to build out some theme options/controls. In a text area, I am asking the user for something that is best output via multiple paragraphs. I want to retain the spacing they specify in this textarea.
I output their option in via shortcode and all spacing is lost. I also output it via an echo and all spacing is lost. So it seems the spacing loss is occurring between input and storage.
THanks for any help!
i just tested this locally… the plugin maintains line breaks in the option’s textarea, so the problem must be w/ how you are displaying it.
wordpress doesn’t save p tags in the database, normally so they won’t get saved by Devin’s plugin. the function wpautop() is attached to the_content filter and it (sometimes seemingly willy-nilly, but that’s a different discussion) determines what should be wrapped in p tags.
what if you
something i came up w/ for a similar issue w/ textareas in metaboxes is to create a filter and attach the normal content filters to that… a “duplicate” the_content if you will. i started out straight up using apply_filters(‘the_content’ $my_value) but some plugins hook into that filter and it can get weird.
then somewhere in your functions.php