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.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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));
share|improve this answer
1  
Perfect! many thanks :) –  James Olney Oct 10 '11 at 10:53

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.