Skip to content
This repository has been archived by the owner on Apr 21, 2018. It is now read-only.

Commit

Permalink
Adjust $content_width on full-width pages. Fixes #21.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwight committed May 3, 2014
1 parent be796f2 commit 56e1cd1
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion functions.php
Expand Up @@ -12,7 +12,24 @@
*
* @since 1.0
*/
if ( ! isset( $content_width ) ) $content_width = 646; // pixels, at 1000px wide
if ( ! isset( $content_width ) ) {
$content_width = 646; // pixels, at 1000px wide
}


/**
* Adjust content width for the full-width template.
*
* @since 2.0
*/
function debut_content_width() {
if ( is_page_template( 'full-width.php' ) ) {
global $content_width;

$content_width = 980;
}
}
add_action( 'template_redirect', 'debut_content_width' );


/**
Expand Down

0 comments on commit 56e1cd1

Please sign in to comment.