Missing anchor tag in wordpress post

Is there a way to display the anchor or link in a post using the_excerpt. In the wordpress editor i have a placed an anchor tag in the beginning of the post. It works correctly when i view the full article. But it does not work when using excerpt.

Here is an image of the post. I even highlighted the word

Read More

http://i255.photobucket.com/albums/hh140/testament1234/anchortag_zpsf77fbef2.jpg

And here is the code when i checked the view source. As you can see the link facebook.com turns into a paragraph instead of an anchor link.

   <div class="content">
              <!--TEXT -->
              <p>www.facebook.com Nullam dictum eleifend neque facilisis pellentesque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur cursus mollis tincidunt. Donec tincidunt, augue ullamcorper pharetra porta, metus turpis volutpat urna, nec [...]</p>


             <a class="readmore" href="http://localhost/wordpress/sample-post-14/"><span>Full Article</span></a>
       </div>

How can i solve this? If i replaced the_excerpt with the_content it will display the contents of that post.

Related posts

Leave a Reply

2 comments

  1. The problem is that by default the_excerpt function disable all the HTML tags. That’s why all the links disappears.

    You will may be need to custom the content returned by the_excerpt function and allow the link tags for example. This tutorial show you how to do this.