From 2e5eed917f40fd467574086a8fbf66c2c46468ab Mon Sep 17 00:00:00 2001 From: Robbert de Kuiper Date: Fri, 31 Mar 2017 14:19:02 +0200 Subject: [PATCH] Hide filters and togglers when only one post is initially loaded --- assets/css/ajax-filter-posts.css | 1 + templates/base.php | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/assets/css/ajax-filter-posts.css b/assets/css/ajax-filter-posts.css index aec9c83..d36a858 100755 --- a/assets/css/ajax-filter-posts.css +++ b/assets/css/ajax-filter-posts.css @@ -38,6 +38,7 @@ width: 50%; float: left; overflow: hidden; + min-height: 1px; /* Show empty filterlist when there is only one post to keep the view intact. */ } .ajax-posts__posts { diff --git a/templates/base.php b/templates/base.php index 15a395a..f6ed007 100644 --- a/templates/base.php +++ b/templates/base.php @@ -1,13 +1,17 @@
- + have_posts() && $query->post_count > 1) : ?> + +