I'm trying to improve a bookmarks manager/theme I've built (http://bookmarkie.waterstreetgm.org).
Right now, each post is simply a link:
<a href="http://tumblr.everlane.com/page/4">Everlane Tumblr</a>. ie: that one single link is the entire content of
Easy enough and works great. Next, I want to be able to get a screenshot of the site via WordPress.com's mShots.
Problem is, I can't seem to extract that link from
the_content() and feed it into the
If that wasn't clear, here's what I'm trying to do:
<img src="http://s.wordpress.com/mshots/v1/the-link-extracted-from-the_content()/?w=1024" />
I've tried severalvariations on this:
$content = get_the_content(); $link = preg_match_all('#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', $content, $match);
But I can't achieve the basic task of extracting that link from
the_content(). At the moment, I simply get a formatted link output. I can't find a way to grab the url instead of grabbing the whole link.
Thanks for any suggestions.