Lodestar: Portfolio page template displays at a wider width than the theme expects. Fixes: #259

This commit is contained in:
Allan Cole 2018-09-12 10:28:07 -04:00
parent 9185c35704
commit 5207afe88a

View file

@ -94,3 +94,13 @@ function lodestar_is_frontpage() {
return false;
endif;
}
/**
* Adjust content_width value for portfolio page template.
*/
function lodestar_portfolio_content_width() {
if ( is_page_template( 'templates/portfolio-page.php' ) ) {
$GLOBALS['content_width'] = 1120;
}
}
add_action( 'template_redirect', 'lodestar_portfolio_content_width' );