_s

Working down Kerikeri’s functions.php

# „On one instance of my site I want to set a max width for images not to overflow. Of course I want to retain image proportions. Images are of various sizes so I am unable to use fixed settings. The TimThumb script turned up in my searches but does not fit my needs as it does not have a maximum setting. Is there any plugin or hack out there that solves my problem?“ Add to the theme’s functions.php file:

/*-----------------------------------------------------------------------------------*/
/* Set the content width based on the theme's design and stylesheet.
/*-----------------------------------------------------------------------------------*/

if ( ! isset( $content_width ) )
	$content_width = 612; /* pixels */

# The $content_width is used for a lot of things, but essentially it’s meant to define the width of the „content“ area of your site. The content area being the space where the posts display. Images inserted into posts are auto-sized down (not up) to that width, so they won’t overflow. Note that this sizing happens at the time the post is created and the image is inserted into the post.

/*-----------------------------------------------------------------------------------*/
/* Sets up theme defaults and registers support for WordPress features. 
/*-----------------------------------------------------------------------------------*/

	// This theme uses post thumbnails
	add_theme_support( 'post-thumbnails' );


www.perun.net/2011/01/13/wordpress-artikelbilder-p…