Genesis Default means you will Set Default for your child theme. Like setting up images, number of posts per page, citation content, layout, paging menu.
Function.php file
Let's open the file function.php genesis child theme, let's start with the hook genesis_theme_settings_defaults Default setting in the installation of Genesis Framework.
// Updates theme settings on reset. add_filter( 'genesis_theme_settings_defaults', 'genesis_child_theme_defaults' ); function genesis_child_theme_defaults( $defaults ) { $defaults('blog_cat_num') = 5; $defaults('content_archive') = 'full'; $defaults('content_archive_limit') = 380; $defaults('content_archive_thumbnail') = 1; $defaults('image_alignment') = 'alignleft'; $defaults('image_size') = 'thumbnail'; $defaults('posts_nav') = 'prev-next'; $defaults('site_layout') = 'content-sidebar'; return $defaults; }
Genesis Default Thiết lập mặc định khi kích hoạt update
// Updates theme settings on activation. add_action( 'after_switch_theme', 'genesis_child_theme_setting_defaults' ); function genesis_child_theme_setting_defaults() { if( function_exists( 'genesis_update_settings' ) ) { genesis_update_settings( array( 'blog_cat_num' => 5, 'content_archive' => 'full', 'content_archive_limit' => 380, 'content_archive_thumbnail' => 1, 'image_alignment' => 'alignleft', 'image_size' => 'thumbnail', 'posts_nav' => 'prev-next', 'site_layout' => 'content-sidebar', ) ); } update_option( 'posts_per_page', 5 ); }
Epilogue
So Genesis Default has been set, this value works for us to customize the default according to the mind. If you do not like the changes can be reset to default easily quickly.
I hope you find this guide helpful. If so, consider sharing it with your audience!
->