-
-
Save TooLogic/ee85d462df2a425183f5ee196d60819a to your computer and use it in GitHub Desktop.
Dynamic page layout management
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'get_header', 'dt_archive_layout', 10 ); | |
function dt_archive_layout() { | |
$config = Presscore_Config::get_instance(); | |
if( is_archive() || is_category() || is_search() ){ | |
$config->set( 'template.columns.number', '5' ); | |
$config->set( 'post.preview.width.min', '200' ); | |
$config->set( 'image_layout', 'resize' ); | |
$config->set( 'thumb_proportions', array( "width" => "2", "height" => "1" ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment