code organization
This commit is contained in:
parent
f159036214
commit
cea714e42f
|
@ -12,8 +12,6 @@ if (
|
|||
}
|
||||
?>
|
||||
<?php get_header(); ?>
|
||||
|
||||
<div class="container-fluid mt-5">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm">
|
||||
|
@ -36,9 +34,6 @@ if (
|
|||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</div> <!-- /.row -->
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -1,6 +1,4 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<div class="container-fluid mt-5">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm">
|
||||
|
@ -17,6 +15,4 @@
|
|||
<?php get_sidebar(); ?>
|
||||
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
</div>
|
||||
<footer class="container-fluid p-4 p-sm-5 mt-2 bg-haiti">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg">
|
||||
|
|
|
@ -18,3 +18,5 @@
|
|||
<!-- <img src="<?php echo get_template_directory_uri() ?>/assets/images/capa.png" class="img-fluid header-img">
|
||||
<i class="material-icons float-right p-1 m-2 mt-3 text-white rounded-circle position-absolute header-icon">settings</i> -->
|
||||
</div>
|
||||
|
||||
<div class="container-fluid mt-5">
|
|
@ -1,11 +1,7 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-sm">
|
||||
<div id="content" role="main">
|
||||
<?php get_template_part('template-parts/index-loop'); ?>
|
||||
<?php get_template_part('template-parts/loop'); ?>
|
||||
</div><!-- /#content -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php get_footer();
|
|
@ -1,6 +1,4 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<div class="container-fluid mt-5">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm">
|
||||
|
@ -12,6 +10,4 @@
|
|||
<?php get_sidebar(); ?>
|
||||
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -1,20 +1,12 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<div class="container-fluid mt-5">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm">
|
||||
<div id="content" role="main">
|
||||
<header class="mb-4 border-bottom">
|
||||
<h1><?php _e('Search Results for', 'tainacan-theme'); ?> “<?php the_search_query(); ?>”</h1>
|
||||
</header>
|
||||
<?php get_template_part('template-parts/search-results'); ?>
|
||||
<?php get_template_part('template-parts/loop'); ?>
|
||||
</div><!-- /#content -->
|
||||
</div>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -1,15 +1,18 @@
|
|||
<?php get_header(); ?>
|
||||
|
||||
<div class="container-fluid mt-5">
|
||||
<div class="row">
|
||||
|
||||
<div class="col col-sm-9 mx-sm-auto p-3">
|
||||
<div id="content" role="main">
|
||||
<?php get_template_part('template-parts/single-post', get_post_format()); ?>
|
||||
<?php if(have_posts()):
|
||||
while(have_posts()): the_post(); ?>
|
||||
<?php get_template_part('template-parts/single-post', get_post_format());
|
||||
endwhile;
|
||||
else:
|
||||
wp_redirect(esc_url( home_url() ) . '/404', 404);
|
||||
exit;
|
||||
endif; ?>
|
||||
</div><!-- /#content -->
|
||||
</div>
|
||||
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
<div class="<?php if(!is_single()) : echo 'card-columns'; endif; ?> mt-3">
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<div class="col-sm">
|
||||
<div class="card w-100">
|
||||
<h5 class="card-header"><?php the_title(); ?></h5>
|
||||
<div class="card-body">
|
||||
<p class="card-text"><?php if(is_single()) : the_content(); else : the_excerpt(); endif; ?></p>
|
||||
<a href="<?php the_permalink(); ?>" class="btn btn-primary">View more</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endwhile; else: ?>
|
||||
<p><?php _e('Sorry, no posts matched your criteria.', 'tainacan-theme'); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<nav class="mx-auto">
|
||||
<?php echo pagination_bst4(); ?>
|
||||
</nav>
|
|
@ -0,0 +1,7 @@
|
|||
<div class="card w-100">
|
||||
<h5 class="card-header"><?php the_title(); ?></h5>
|
||||
<div class="card-body">
|
||||
<p class="card-text"><?php if(is_single()) : the_content(); else : the_excerpt(); endif; ?></p>
|
||||
<a href="<?php the_permalink(); ?>" class="btn btn-primary">View more</a>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,20 @@
|
|||
<?php if(have_posts()): ?>
|
||||
<div class="card-columns mt-3">
|
||||
<div class="col-sm">
|
||||
<?php while(have_posts()):
|
||||
the_post();
|
||||
//Index
|
||||
if(!is_single())
|
||||
get_template_part('template-parts/list-post');
|
||||
else
|
||||
printf('<p>%2</p>', _e('Sorry, no posts matched your criteria.', 'tainacan-theme'));
|
||||
endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="mx-auto">
|
||||
<?php echo pagination_bst4(); ?>
|
||||
</nav>
|
||||
<?php else:
|
||||
wp_redirect(esc_url( home_url() ) . '/404', 404);
|
||||
exit; ?>
|
||||
<?php endif; ?>
|
|
@ -1,12 +0,0 @@
|
|||
<?php if(have_posts()): while(have_posts()): the_post(); ?>
|
||||
<article role="article" id="post_<?php the_ID()?>" <?php post_class()?>>
|
||||
<header>
|
||||
<h2><a href="<?php the_permalink(); ?>"><?php the_title()?></a></h2>
|
||||
</header>
|
||||
<?php the_excerpt(); ?>
|
||||
</article>
|
||||
<?php endwhile; else: ?>
|
||||
<div class="alert alert-warning">
|
||||
<i class="material-icons">warning</i> <?php _e('Sorry, your search yielded no results.', 'tainacan-theme'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
|
@ -1,5 +1,3 @@
|
|||
<?php if(have_posts()):
|
||||
while(have_posts()): the_post(); ?>
|
||||
<article role="article" id="post_<?php the_ID()?>" <?php post_class()?>>
|
||||
<header class="mb-4">
|
||||
<h1>
|
||||
|
@ -40,10 +38,4 @@
|
|||
<?php
|
||||
if ( comments_open() || get_comments_number() ) :
|
||||
comments_template();
|
||||
endif;
|
||||
endwhile;
|
||||
else:
|
||||
wp_redirect(esc_url( home_url() ) . '/404', 404);
|
||||
exit;
|
||||
endif;
|
||||
?>
|
||||
endif; ?>
|
Loading…
Reference in New Issue