From 339a34cf22a967296d5cdcebe23b2fb9b8d2bdb3 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Mon, 31 Jul 2017 19:05:28 +0300 Subject: [PATCH] FIX: post extra class condition. --- layout/_macro/post.swig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 3f419729c..baa31d37b 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -3,7 +3,9 @@ {% set headlessPost = Array.prototype.indexOf.call(['quote', 'picture'], post.type) > -1 %} {% set post_class = 'post post-type-' + post.type | default('normal') %} - {% set post_class = post_class + ' ' + post_extra_class | default('') %} + {% if post_extra_class > 0 %} + {% set post_class = post_class + ' ' + post_extra_class | default('') %} + {% endif %} {% if post.sticky > 0 %} {% set post_class = post_class + ' ' + 'post-sticky' %} {% endif %}