diff options
author | Jos Poortvliet <jospoortvliet@gmail.com> | 2019-01-22 13:07:43 +0300 |
---|---|---|
committer | Jos Poortvliet <jospoortvliet@gmail.com> | 2019-01-22 13:07:43 +0300 |
commit | ef93bccb787c38334382295369cf58931e9278bf (patch) | |
tree | 609395202108a6984dbd34dacc645df8ab7c83a8 /page-blog.php | |
parent | 4efc10ed63ef81d74613a7cdf647e2b74cf1bfae (diff) |
fix blog
Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
Diffstat (limited to 'page-blog.php')
-rw-r--r-- | page-blog.php | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/page-blog.php b/page-blog.php index 2d8ce22c..0cd34a87 100644 --- a/page-blog.php +++ b/page-blog.php @@ -1,6 +1,6 @@ <!-- This is the postgrid page --> <head> -<link href="<?php echo get_template_directory_uri(); ?>/assets/css/pages/blogroll.css?v=1" rel="stylesheet"> +<link href="<?php echo get_template_directory_uri(); ?>/assets/css/pages/blogroll.css?v=2" rel="stylesheet"> <!--<script> require(["require.config"], function() { require(["modules/youtubePlayer", "modules/submenu"]) @@ -18,12 +18,53 @@ </div> </div> </div> -<section class="section--grid"> +<section class="section--blogroll"> <div class="container"> -<?php echo do_shortcode("[post_grid id='3635']"); ?> +<div class="row"> + <div class="text-center"> + <?php get_search_form(); ?> + </div> +</div> + <?php if (!have_posts()) : ?> + <div class="alert alert-warning"> + <?php _e('Sorry, no results were found.', 'roots'); ?> + </div> + <?php endif; ?> +<div class="row"> + <?php $i = 1; ?> + <?php while (have_posts()) : the_post(); ?> + <?php if ($i % 3 == 0) { ?> <!-- for every three posts we have to put in a row... --> + <div class="row"> + <div class="col-md-4"> + <?php get_template_part('templates/content', get_post_format()); ?> + </div> + </div> + <?php } else { ?> <!-- no row needed... --> + <div class="col-md-4"> + <?php get_template_part('templates/content', get_post_format()); ?> + </div> + <?php } ?> + <?php $i++; ?> + <?php endwhile; ?> +</div> + <?php if ($wp_query->max_num_pages > 1) : ?> + <nav class="post-nav"> + <ul class="pager"> + <li class="previous"><?php next_posts_link(__('← Older posts', 'roots')); ?></li> + <li class="next"><?php previous_posts_link(__('Newer posts →', 'roots')); ?></li> + </ul> + </nav> + <?php endif; ?> </div> </section> +<!-- old grid --> +<!--<section class="section--grid"> +<div class="container"> +<?php // echo do_shortcode("[post_grid id='3635']"); ?> +</div> +</section>--> + <section class="section--newsletter"> <div class="container-fluid quote"> <h2 class="text-center revealOnScroll"><?php echo $l->t('Subscribe to our newsletter');?></h2> @@ -39,3 +80,15 @@ </div> </div> </section> + + + +<!-- This is the blog list. --> +<head> +<link href="<?php echo get_template_directory_uri(); ?>/assets/css/pages/blogroll.css" rel="stylesheet"> +<!--<script> + require(["require.config"], function() { + require(["modules/youtubePlayer", "modules/submenu"]) + }); +</script>--> +</head> |