From ca86092f14fb9ce3d0d24389d12cdc26ad2907be Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 31 Oct 2017 12:08:59 -0400 Subject: [PATCH] Test for last count If last post then add class end to grid. --- sections/landing-page.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sections/landing-page.php b/sections/landing-page.php index ce6d966..863857b 100644 --- a/sections/landing-page.php +++ b/sections/landing-page.php @@ -56,9 +56,14 @@ } else { $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_parent), 'glm-block-image'); } + if (($parent->current_post +1) == ($parent->post_count)){ + $end = ' end '; + } else { + $end = ''; + } ?> -
+

-- 2.17.1