I run a few side blogs that I sort of aggregate into my main blog.
I use simplepie to parse the feeds from my other blogs, so the posts are being created automatically.
My typical post is 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. The custom field already exists in the post, but I need to insert the hyperlink contained in the post content as the value.
I would need just the link, without the html, so the 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 anything else, like hyperlinks.
I posted this question over at the WordPress forums and was told I’d have to parse the entire post content looking for the links, which I knew, the problem is I’m not too sure how to do that.
Thanks
Building on Anthony’s answer, use the UPDATE POST META once you have your link…
Put this in your functions.php file:
Then in your query loop, category file or whatever php file you would do the following