Good day.
I guess my first question is exactly how much/what type of markup you were hoping for, beyond say just some paragraphs. If just paragraphs are what you need, then line breaks should preserve. I was able to save this as a description as is:
FILMS!
More text testing
and then some
llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
I was going to say a quick application of say wpautop()
would take care of the rest for you, but I tried out the the_archive_description()
function and it preserved all that as well. Yay! Less work.
However, if you’re thinking a bit more complex markup, then we probably want to go a separate route.
Most specifically, if you’re comfortable enough with WordPress actions/filters, then we do have a cptui_pre_register_post_type
filter available that passes in the array of arguments for the post type in question, matching what you’d have if you were using register_post_type()
yourself.
Something like this could be done in your case:
function my_cptui_amend_post_type_args( $args, $post_type_slug, $post_type_settings ) {
// Change "movie" to whatever post type you're wanting this for.
if ( 'movie' !== $post_type_slug ) {
return $args;
}
$args['description'] = '<div style="color:red">Your post type description</div>';
return $args;
}
add_filter( 'cptui_pre_register_post_type', 'my_cptui_amend_post_type_args', 10, 3 );
Yeah, it kind of takes things out of the UI, but I’ve tested and it works.
Let me know if neither of these work for your usecase, and I can shake my head until something new rattles.