Quantcast
Viewing all articles
Browse latest Browse all 95934

Khürt Williams on "How to Modify the Width of the WordPress [Twenty Thirteen Theme] Post Image?"

I modified the post content width of the Twenty Thireen theme in the style sheet (style.css) to 960 on my blog.

However, I can't seem to get the images to scale to fit the content area. All images on the site were 960px wide before switching to Twenty Thirteen.

I've modified the themes functions file (functions.php) as follows

/**
 * Adjusts content_width value for video post formats and attachment templates.
 *
 * @since Twenty Thirteen 1.0
 *
 * @return void
 */
function twentythirteen_content_width() {
	global $content_width;

	if ( is_attachment() )
		/** $content_width = 724; */
		$content_width = 960;
	elseif ( has_post_format( 'audio' ) )
		$content_width = 484;
}
/**
 * Prints the attached image with a link to the next attached image.
 *
 * @since Twenty Thirteen 1.0
 *
 * @return void
 */
function twentythirteen_the_attached_image() {
	$post                = get_post();
	/** $attachment_size     = apply_filters( 'twentythirteen_attachment_size', array( 724, 724 ) ); **/
	$attachment_size     = apply_filters( 'twentythirteen_attachment_size', array( 960, 960) );
	$next_attachment_url = wp_get_attachment_url();

This doesn't seem to work. What am I doing wrong?


Viewing all articles
Browse latest Browse all 95934

Trending Articles