Format Text Output From $my_query
Thanks to this post http://wordpress.org/support/topic/34158 I’ve gotten my sidebar ‘Tip of the Week’ column working. The problem I’m having when using this code . . .
<?php $my_query = new WP_Query(‘cat=4&showposts=1’); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<?php echo $post->post_title; ?>
<?php echo $post->post_content; ?>
<?php endwhile; ?>
is that the text that is output is not being formatted (i.e. line breaks are not showing up – all text is combined). Any ideas on what I could change to make that happen?
- The topic ‘Format Text Output From $my_query’ is closed to new replies.