I am putting post excerpts on our main (non-WordPress) homepage using the following code:
$posts = get_posts('numberposts=10&order=DESC&orderby=post_title');
foreach ($posts as $post) : start_wp(); ?>
<?php the_date(); echo "<br />"; ?>
<?php the_title(); ?>
<?php the_excerpt(); ?>
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?