Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: How to show multiple excerpt for every search query matches

Discussion in 'Misc WordPress Requests' started by bcworkz, Dec 5, 2017.

  1. bcworkz

    Guest

    Reply To: How to show multiple excerpt for every search query matches, by bcworkz

    Sure, it’s possible. Sorry for the slow reply. Within the search listing loop, instead of outputting the normal generic excerpt, search through post content using normal PHP string functions to find search term occurrences. Once the position offset of each match is known, you can back up and go forward so many words to develop an excerpt. This can result in overlapping excerpts unless there is additional code to consolidate overlaps into a single, larger excerpt.

    Reply To: How to show multiple excerpt for every search query matches
     
    #1

Share This Page

Web Hosting