/ Published in: PHP
From Web Design Ledger "13 Useful Code Snippets for WordPress Development"
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function imageresizer( $atts, $content = null ) { return '<img src="/timthumb/timthumb.php?src='.$content.'&w=590" alt="" />'; } add_shortcode('img', 'imageresizer'); // Then add the following syntax to your posts // [img]http://www.yoursite.com/yourimage.jpg[/img
URL: http://webdesignledger.com/tips/13-useful-code-snippets-for-wordpress-development