Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( is_home() ) : ?>
- <div id="primary" class="content-area <?php echo ( get_theme_mod( 'nikkon-blog-full-width', false ) ) ? sanitize_html_class( 'content-area-full' ) : ''; ?>">
- <?php else : ?>
- <div id="primary" class="content-area">
- <?php endif; ?>
- <div class="tab-content clearfix">
- <?php
- $categories = get_categories( array( 'orderby' => 'term_id', 'order' => 'ASC',) );
- $i=0;
- $_active = '';
- foreach ( $categories as $category ) {
- $_active = ($i == 0 ? ' active' : '');
- echo "n";
- echo sprintf('<div class="tab-pane%s" id="%s">',
- $_active, str_replace( ' ', '-', strtolower( $category->cat_name ) )
- );
- echo "n";
- $_loop = new WP_Query( array(
- 'post_type' => 'post',
- 'post_status' => 'publish',
- 'cat' => $category->term_id,
- 'paged' => $paged
- ) );
- echo "n";
- echo '<main id="main" class="site-main" role="main">';
- echo "n";
- get_template_part( '/templates/titlebar' );
- if ( $_loop->have_posts() ):
- echo "n<!--//**************** BEGIN POSTS ***************************//-->n";
- //original:
- // <div class="blog-blocks-wrap blog-blocks-wrap-remove blog-columns-three blog-style-postblock">
- //echo ( get_theme_mod( 'nikkon-blog-layout' ) == 'blog-blocks-layout' ) ? '<div class="blog-blocks-wrap blog-blocks-wrap-remove blog-columns-three ' . sanitize_html_class( $blog_style ) . '">' : '';
- echo '<div class="blog-blocks-wrap blog-columns-three blog-style-postblock">';
- // original:
- // <div class="blog-blocks-wrap-inner">
- //echo ( get_theme_mod( 'nikkon-blog-layout' ) == 'blog-blocks-layout' ) ? '<div class="blog-blocks-wrap-inner">' : '';
- echo '<div>';
- while ( $_loop->have_posts() ) : $_loop->the_post();
- get_template_part( 'templates/contents/content' );
- endwhile;
- echo ( get_theme_mod( 'nikkon-blog-layout' ) == 'blog-blocks-layout' ) ? '<div class="clearboth"></div></div>' : '';
- echo ( get_theme_mod( 'nikkon-blog-layout' ) == 'blog-blocks-layout' ) ? '</div>' : '';
- echo "n<!--//**************** END POSTS ***************************//-->n";
- else:
- get_template_part( 'templates/contents/content', 'none' );
- endif;
- echo "n";
- echo '</main>';
- echo "n";
- echo '</div>';
- echo "n";
- $i++;
- }
- ?>
- </div>
- <!-- posts pagination -->
- <?php wp_pagenavi(); ?>
Add Comment
Please, Sign In to add comment