0

In one part of my site I am displaying custom field data like this:

<?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'info', true);
?>

This works ok but it strips any paragraph breaks out and displays it all as one big block which makes it hard to read.

So how do I make it respect the paragraph breaks?

many thanks in advance!

James

3

this obviously depends on the content of your 'info' custom field; generally, you could try:

echo apply_filters('the_content', get_post_meta($postid, 'info', true));
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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