WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] post code in archive different (loses <li>, <ul> and <ol> (4 posts)

  1. laurim
    Member
    Posted 8 years ago #

    I created a post with both an ordered and unordered list so I could check the list formatting css. In the editing screen it looks like this:

    bu uisbciusb ciubscisb isbci sbciusb cibsiucbisubciu sibcc
    <ul>
    <li>item 1</li>
    <li>item 2 is longer and hopefully will wrap by the time I finish this line or I'll need a little more</li>
    </ul>

    <ol>
    <li>item 1</li>
    <li>item 2 is longer and hopefully will wrap by the time I finish this line or I'll need a little more</li>
    </ol>

    closing thoughts

    The post on the main entry page and the single entry looks fine. The same entry on an archive page loses the list-related tags and becomes:

    <p>bu uisbciusb ciubscisb isbci sbciusb cibsiucbisubciu sibcc</p>
    <p>item 1<br />
    item 2 is longer and hopefully will wrap by the time I finish this line or I’ll need a little more</p>
    <p>item 1<br />
    item 2 is longer and hopefully will wrap by the time I finish this line or I’ll need a little more</p>
    <p>closing thoughts</p>

    I have no special formatting plugins installed. Does anyone know why the archived version of a post would lose its list tags? Sorry, I can't give the url of the page.

  2. vkaryl
    Member
    Posted 8 years ago #

    In order to retain your formatting, images, etc. in the archive pages, you need to replace the_excerpt with the_content in archive.php.

  3. laurim
    Member
    Posted 8 years ago #

    Zap! Quick solution. Thanks!

  4. vkaryl
    Member
    Posted 8 years ago #

    You're welcome!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags