I was searching for a way to show screenshot preview of sites in WordPress instead of uploading images, this way, if a site changes, It will show the updated version, extremly helpful when you have a directory that needs to be updated (less maintanance…)
Example:
[ss_screenshot width='600' site='http://www.zorem.com/']
[code]
function wpr_snap($atts, $content = null) {
extract(shortcode_atts(array(
"snap" => 'http://s.wordpress.com/mshots/v1/',
"url" => 'http://www.internoetics.com',
"alt" => 'Image text',
"w" => '400', // width
"h" => '300' // height
), $atts));
$img = '<img src="' . $snap . '' . urlencode($url) . '?w=' . $w . '&h=' . $h . '" alt="' . $alt . '">';
return $img;
}
add_shortcode("snap", "wpr_snap");
[/code]
Than add this to your theme code or to any post/page
[code][ss_screenshot width='600' site='http://www.zorem.com/'][/code]
For more detailed information check out:

Twitter
No comments yet.