• The Posts in my sidebar loop lose formatting like line breaks and boldness (html).
    Is that The default behavior?
    Is there a plugin or hack to fix that?
    Thanks in advance,
    Noah D

Viewing 4 replies - 1 through 4 (of 4 total)
  • Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of specific help.

    Thread Starter deezlee

    (@deezlee)

    here is the site (very much under construction!)
    http://deezlee.com/aub

    I’m using this code to show today’s events in the sidebar:
    `<?php $temp_query = $wp_query; ?>

    <?php

    $today = getdate();
    query_posts(‘category_name=Events&posts_per_page=1&year=’ .$today[“year”] .’&monthnum=’ .$today[“mon”] .’&day=’ .$today[“mday”] );
    ?>

    <?php while (have_posts()) : the_post(); ?>

    <div style=”float:left;”>” rel=”bookmark”><?php the_post_thumbnail( array(92,69) ); ?></div>

    <b>” rel=”bookmark”><?php the_title(); ?></b>
    <?php the_excerpt(); ?>
    <div class=”deezclear”></div>
    <?php endwhile; ?>
    <?php $wp_query = $temp_query; ?>

    it’s working well, except that the formatting is lost…
    Thanks again in advance

    Try using <?php the_content(); ?> instead of <?php the_excerpt(); ?>

    And posting snippets of code in-between backticks on the forum makes it much easier to read. 🙂

    Thread Starter deezlee

    (@deezlee)

    ooop, i think that i forgot the close back-tick (!?)

    hey thanks for the help,
    If i use php the_content, then i guess that i can limit the output to only show an excerpt of the text and nothing else? i guess i’ll go look that up! (or feel free to hit me with some suggested code!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Posts in sidebar loop lose formatting (html)’ is closed to new replies.