Commit 3a5dccb1 authored by agnez's avatar agnez

categories in 3 collumns

parent e131e118
......@@ -10,189 +10,28 @@
get_header(); ?>
<div class="container">
<?php
$left_right = get_theme_mod( 'multipurpose_blog_theme_options','One Column');
if($left_right == 'Left Sidebar'){ ?>
<div class="row">
<div class="col-md-4 col-sm-4"><?php get_sidebar(); ?></div>
<div id="our-services" class="services col-md-8 col-sm-8">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
<div class="row">
<?php if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content',get_post_format() );
while ( have_posts() ) : the_post();?>
<div class="col-md-4 col-sm-4">
<div id="post-<?php the_ID(); ?>" <?php post_class('inner-service'); ?>>
<h3 class="section-title"><a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title_attribute(); ?>"><?php the_title();?></a></h3>
<div class="date-box">
<i class="far fa-calendar-alt"></i><a href="<?php echo esc_url( get_permalink() ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a>
</div> <?php
if(has_post_thumbnail()) {
the_post_thumbnail( 'medium' );
}?>
<div class="new-text">
<?php the_excerpt();?>
</div>
</div>
</div><?php
endwhile;
else :
get_template_part( 'no-results' );
endif;
?>
<div class="navigation">
<?php
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'multipurpose-blog' ),
'next_text' => __( 'Next page', 'multipurpose-blog' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'multipurpose-blog' ) . ' </span>',
) );
?>
<div class="clearfix"></div>
</div>
</div>
</div>
<?php }else if($left_right == 'Right Sidebar'){ ?>
<div class="row">
<div id="our-services" class="services col-md-8 col-sm-8">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
<?php if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content',get_post_format() );
endwhile;
else :
get_template_part( 'no-results' );
endif;
?>
<div class="navigation">
<?php
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'multipurpose-blog' ),
'next_text' => __( 'Next page', 'multipurpose-blog' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'multipurpose-blog' ) . ' </span>',
) );
?>
<div class="clearfix"></div>
</div>
</div>
<div class="col-md-4 col-sm-4"><?php get_sidebar(); ?></div>
</div>
<?php }else if($left_right == 'One Column'){ ?>
<div id="our-services" class="services">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
<?php if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content',get_post_format(),get_post_format() );
endwhile;
else :
get_template_part( 'no-results' );
endif;
?>
<div class="navigation">
<?php
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'multipurpose-blog' ),
'next_text' => __( 'Next page', 'multipurpose-blog' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'multipurpose-blog' ) . ' </span>',
) );
?>
<div class="clearfix"></div>
</div>
</div>
<?php }else if($left_right == 'Three Columns'){ ?>
<div class="row">
<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-1'); ?></div>
<div id="our-services" class="services col-md-6 col-sm-6">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
<?php if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content',get_post_format() );
endwhile;
else :
get_template_part( 'no-results' );
endif;
?>
<div class="navigation">
<?php
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'multipurpose-blog' ),
'next_text' => __( 'Next page', 'multipurpose-blog' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'multipurpose-blog' ) . ' </span>',
) );
?>
<div class="clearfix"></div>
</div>
</div>
<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-2'); ?></div>
</div>
<?php }else if($left_right == 'Four Columns'){ ?>
<div class="row">
<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-1'); ?></div>
<div id="our-services" class="services col-md-3 col-sm-3">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
<?php if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content',get_post_format() );
endwhile;
else :
get_template_part( 'no-results' );
endif;
?>
<div class="navigation">
<?php
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'multipurpose-blog' ),
'next_text' => __( 'Next page', 'multipurpose-blog' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'multipurpose-blog' ) . ' </span>',
) );
?>
<div class="clearfix"></div>
</div>
</div>
<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-2'); ?></div>
<div id="sidebar" class="col-md-3 col-sm-3"><?php dynamic_sidebar('sidebar-3'); ?></div>
</div>
<?php }else if($left_right == 'Grid Layout'){ ?>
<div class="row">
<div id="our-services" class="row services col-md-8 col-sm-8">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
<?php if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/grid-layout' );
endwhile;
else :
get_template_part( 'no-results' );
endif;
?>
<div class="navigation">
<?php
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'multipurpose-blog' ),
'next_text' => __( 'Next page', 'multipurpose-blog' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'multipurpose-blog' ) . ' </span>',
) );
?>
<div class="clearfix"></div>
</div>
</div>
<div class="col-md-4 col-sm-4"><?php get_sidebar(); ?></div>
</div>
<?php }?>
</div>
endif; ?>
</div>
<div class="clearfix"></div>
<?php get_footer(); ?>
\ No newline at end of file
......@@ -42,6 +42,13 @@ function vs_thumbs() {
}
?>
<?php
add_action( 'after_setup_theme', 'vs_remove_theme_support', 11 );
function vs_remove_theme_support() {
remove_theme_support( 'post-formats' );
}
?>
<?php
/* Theme Widgets Setup */
function vs_widgets_init() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment