therocks
Member
Posted 2 years ago #
Alright, so my posts are layed out like this:
IMAGE
CONTENT/TEXT
HYPERLINK
What I'm looking to do is automatically grab the hyperlink, and insert it into a Custom Field. I would need just the link, without the a href html, so the Custom Field's value would be just a straight link - http://domain.com/fsdds
I know there are a number of plugins that accomplish this with images, but I haven't seen anything that will do it with hyperlinks. Does anyone know if this is possible?
Theoretically possible but technically a lot more difficult than grabbing 1 or more images associated with a given post. You'd need to parse the entire post content looking for a match against 'http://'.
Why not just place the link in the custom field when you create the post?
therocks
Member
Posted 2 years ago #
Hi Esmi,
I run a few side blogs that I sort of aggregate into my main blog.
I use Autoblogged to pull in the posts from my other blogs, so the posts are being created automatically.
There's an option to have Autoblogged create a new custom field for each post it parses, but since the hyperlink will be different in each post, so will the value for my custom field, so I was looking for a way to grab the post's hyperlink and insert it into that custom field on the fly. It really doesn't matter if I can do it via Autoblogged or a seperate plugin, as long as it works.
How would I go about parsing the entire post content?
Thanks