| name | language | licence |
|---|---|---|
| Alternate Post Styling On Your Home Page | PHP | Other |
| Customizing the Dashboard Widgets | PHP | Other |
| Fonts | PHP | Other |
| CSS Buttons | CSS | Other |
| Overwrite Post Titles Easily | PHP | Other |
| Add Multiple Sidebars | PHP | Other |
| Auto-Resize Images Using TimThumb And WordPress Shortcodes | PHP | Other |
| Dropping in Your Own Logo | PHP | Other |
< 1 2 >
language: PHP
licence: Other
Auto-Resize Images Using TimThumb And WordPress Shortcodes
options: view full snippet • send to code collector
//The first thing to do is create the shortcode. Paste the following code in your functions.php file
function imageresizer( $atts, $content = null ) {
return '<img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/10//timthumb/timthumb.php?src='.$content.'&w=590" alt="" />';
}
add_shortcode('img', 'imageresizer');
//Now, you can use the following syntax to add an automatically resized image to your blog post:
[img]http://www.yoursite.com/yourimage.jpg[/img]



library
buttons (3)
wp (93)