diff --git a/_includes/tiles.html b/_includes/tiles.html
index 39a8d7a..62892cd 100644
--- a/_includes/tiles.html
+++ b/_includes/tiles.html
@@ -1,28 +1,18 @@
+{% if 'posts' == site.tiles-source %}
+ {% assign tiles = site.posts %}
+{% elsif 'pages' == site.tiles-source %}
+ {% assign tiles = site.html_pages | where_exp: "item", "item.show_tile != false" %}
+{% endif %}
- {% for post in site.posts limit:site.tiles-count %}
- {% if site.tiles-source == 'posts' %}
+ {% for tile in tiles limit:site.tiles-count %}
-
+
-
+
{{ post.description }}
- {% endif %}
- {% endfor %}
- {% for page in site.html_pages limit:site.tiles-count %}
- {% if site.tiles-source == 'pages' and page.show_tile != false %}
-
-
-
-
-
-
- {{ page.description }}
-
-
- {% endif %}
{% endfor %}