WordPress.org

Ready to get started?Download WordPress

Forums

Excerpts on separate page stripping link code (1 post)

  1. nokaoii
    Member
    Posted 1 year ago #

    I am putting post excerpts on our main (non-WordPress) homepage using the following code:

    <?php
    $posts = get_posts('numberposts=10&order=DESC&orderby=post_title');
    foreach ($posts as $post) : start_wp(); ?>
    <span id="postdate">
    <?php the_date(); echo "<br />"; ?>
    </span>
    <span id="posttitle">
    <?php the_title(); ?>
    </span>
    <span id="postexcerpt">
    <?php the_excerpt(); ?>
    </span>
    <?php
    endforeach;
    ?>

    This works perfectly fine and does an excellent job that if the post is longer than X, it truncates it and creates a "Continue Reading" link directly to the post.

    However if the, on this page, an actually link is shown, it's stripping out the link code and posting it as plain text. If you click on the post and read it in the actual WordPress page, the link is there and works fine.

    Does anyone know why it's stripping the link code and how to correct this behavior?

    Site: http://www.auglaizeunitedway.org/

Topic Closed

This topic has been closed to new replies.

About this Topic