index.php (818B)
1 <?php 2 /** 3 * The main template file 4 * 5 * This is the most generic template file in a WordPress theme 6 * and one of the two required files for a theme (the other being style.css). 7 * It is used to display a page when nothing more specific matches a query. 8 * E.g., it puts together the home page when no home.php file exists. 9 * 10 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 11 * 12 * @package welbim 13 */ 14 15 get_header(); 16 $blog_style = get_query_var( 'blog_style'); 17 if(!$blog_style){ 18 $blog_style = welbim_get_options('blog_style'); 19 } 20 if( $blog_style == 1 ) : 21 $blog_style_name = 'standard'; 22 elseif( $blog_style == 2 ) : 23 $blog_style_name = 'grid'; 24 else : 25 $blog_style_name = 'standard'; 26 endif; 27 get_template_part('template-parts/blog-layout/blog-'. $blog_style_name ); 28 get_footer();