Lodestar: Portfolio page template displays at a wider width than the theme expects. Fixes: #259
This commit is contained in:
parent
9185c35704
commit
5207afe88a
1 changed files with 10 additions and 0 deletions
|
@ -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' );
|
||||
|
|
Loading…
Reference in a new issue