From: Steve Sutton Date: Tue, 31 Oct 2017 16:08:59 +0000 (-0400) Subject: Test for last count X-Git-Tag: v1.0.7^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=ca86092f14fb9ce3d0d24389d12cdc26ad2907be;p=WP-Themes%2Fkeweenaw2017.git Test for last count If last post then add class end to grid. --- 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 = ''; + } ?> -
+