'; print_r($_themeblvd_config); echo ""; $homepage_content = themeblvd_get_option( 'homepage_content', null, 'posts' ); $content = themeblvd_get_option( 'blog_content' ); // In displaying the homepage, we need to first figure out if a custom layout // should show or we're going to list out posts. If the user were to apply a // custom layout to a static page, and then set that as the frontpage under // Settings > Reading > Frontpage displays, any paginated elements in the // layout will not work right. So, to combat this, it's setup that the user // can select a custom layout from their Theme Options page and leave their // frontpage displays option to "your latest posts." if( $homepage_content == 'custom_layout' ) { /*------------------------------------------------------*/ /* Custom Layout Homepage /*------------------------------------------------------*/ get_template_part( 'template_builder' ); } else { // Template part $template_part = themeblvd_get_part( 'index' ); // Setup if( $template_part == 'grid' || $template_part == 'index_grid' ) { /*------------------------------------------------------*/ /* Magazine Homepage setup (post grid) /*------------------------------------------------------*/ // Columns $columns = themeblvd_get_option( 'index_grid_columns' ); if( ! $columns ) $columns = apply_filters( 'themeblvd_default_grid_columns', 3 ); // Rows $rows = themeblvd_get_option( 'index_grid_rows' ); if( ! $rows ) $rows = apply_filters( 'themeblvd_default_grid_columns', 4 ); // Thumbnail size $size = themeblvd_grid_class( $columns ); // Re-Build query string $query_string = ''; // Categories $exclude = themeblvd_get_option( 'index_grid_categories' ); if( $exclude ) { $categories = 'cat='; foreach( $exclude as $key => $value ) if( $value ) $categories .= '-'.$key.','; $categories = themeblvd_remove_trailing_char( $categories, ',' ); } if( isset( $categories ) ) $query_string .= $categories; // Posts per page $query_string .= 'posts_per_page='.get_option( 'posts_per_page' ).'&'; // Pagination $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $query_string .= $paged; } else { /*------------------------------------------------------*/ /* Standard Blog Homepage setup (post list) /*------------------------------------------------------*/ $query_string = themeblvd_query_string(); $content = themeblvd_get_option( 'blog_content' ); } // Header get_header(); // Featured area if( themeblvd_config( 'featured' ) ) { themeblvd_featured_start(); themeblvd_featured( 'blog' ); themeblvd_featured_end(); } // Start main area themeblvd_main_start(); themeblvd_main_top(); // Breadcrumbs themeblvd_breadcrumbs(); // Before sidebar+content layout themeblvd_before_layout(); ?>