Muhammed Imran Hussain


(WordPress) How to show links in excerpt?

the_excerpt() function displays the summary of the page/post content after applying several filters to it including links.

If you want to show links in excerpt call or if you want to apply your own filtering algorithm, at first need to remove the wp_trim_excerpt filter from get_the_excerpt.

Then you need to write your own filtering function that will perform most of the same actions that wp_trim_excerpt performs. You can find the wp_trim_excerpt function in wp-includes/formatting.php for reference.

For not to filter link tag in excerpt call I wrote following code in functions.php

🙂 it is working for me…


  1. Wonderful post however I was wanting to know if you could write a litte more on this subject?
    I’d be very grateful if you could elaborate a little bit further.

  2. Superb site you have here but I was wondering if you knew of any message boards that cover the same topics discussed here?
    I’d really like to be a part of community where I can get opinions from other knowledgeable individuals that share the same interest.

    If you have any suggestions, please let me know.
    Many thanks!

  3. Just want to say your article is as astounding. The clarity in your
    publish is simply nice and i could assume you are knowledgeable
    in this subject. Fine with your permission let me to
    grasp your feed to stay up to date with coming near
    near post. Thanks 1,000,000 and please keep up the gratifying work.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.