Last active
March 22, 2018 21:06
-
-
Save thecodepoetry/9ceced7f7dff0501c01c to your computer and use it in GitHub Desktop.
Dynamic page layout management
This file contains hidden or 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" ) ); | |
| } | |
| } |
Hi,
Can I create separate archive layout for teammate posts?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I search on wich file i can put
echo '<pre>'; print_r($config); echo '</pre>';after
presscore_config_base_init();Thx :)