Custom fuction to modify <!–more–> excerpts
-
Greetings, hive mind! ??
I run a photoblog with a bit of text and an image in the post excerpt, which is separated from the rest by the <!–more–> tag. The post title and read more box link to the full post permalink, but not the image, which links to a larger size of itself.
I would like the image to link to large itself only in the full post, not the post excerpt, where it should link to the post permalink as well. So I want to register a custom function as a filter, for the post excerpt that is returned as the part before <!–more–>
Unfortunately, the only solutions I found were for manual excerpts, and I was unable to find a filter name (https://codex.www.ads-software.com/Plugin_API/Filter_Reference) that would identify this part of the post, so that I can use regexp to strip the link and add a new one around each img tag.
Please advise!
–gw
- The topic ‘Custom fuction to modify <!–more–> excerpts’ is closed to new replies.