searched word hightlighted but also give excerpt read more url instead of "read"
-
Hi all,
I have use the below code for to highlight the searched word with the text of excerpt and it work fine but it has been also give me full url of the read more instead of “Read more” text.
like:
other text chamber/calendar/state-of-the-county-luncheon-february/”>Read MoreBut we want only:
Read Morenot printed url for the user.
I have use below code:
$excerpt = get_the_excerpt(); $keys= explode(" ",$s); echo $excerpt = preg_replace('/('.implode('|', $keys) .')/iu', '<strong style="color:#007441;"></strong>', $excerpt);
Also in the text it has been give the question mark instead of many punctuation symbol.
- The topic ‘searched word hightlighted but also give excerpt read more url instead of "read"’ is closed to new replies.