From 042c95afb18e85e8f557b16df4dfa8a15e7a66ee Mon Sep 17 00:00:00 2001 From: Florent Hernandez Date: Wed, 30 Aug 2023 14:32:03 +0200 Subject: [PATCH] Fix Sitemap links (#2105) - fix post links - fix category links - move up empty condition to avoid empty category - fix font-family for list content --- assets/src/scss/pages/_sitemap.scss | 2 +- page-templates/sitemap.php | 2 +- templates/sitemap.twig | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/src/scss/pages/_sitemap.scss b/assets/src/scss/pages/_sitemap.scss index 16c55f8657..51ddbd338d 100644 --- a/assets/src/scss/pages/_sitemap.scss +++ b/assets/src/scss/pages/_sitemap.scss @@ -3,7 +3,6 @@ a { color: var(--body--color); - font-family: var(--headings--font-family); &:visited, &:active, @@ -17,6 +16,7 @@ } h5 { + font-family: var(--headings--font-family); margin-bottom: 1rem; } diff --git a/page-templates/sitemap.php b/page-templates/sitemap.php index b0ecb9a96c..a1b85ed5c0 100644 --- a/page-templates/sitemap.php +++ b/page-templates/sitemap.php @@ -21,7 +21,7 @@ $context['custom_body_classes'] = 'white-bg'; $context['page_category'] = 'Sitemap Page'; -if (get_theme_mod('new_identity_styles')) { +if (!empty(planet4_get_option('new_ia'))) { $context['categories'] = get_categories(['orderby' => 'name', 'order' => 'ASC']); $context['posts'] = []; foreach ($context['categories'] as $cat) { diff --git a/templates/sitemap.twig b/templates/sitemap.twig index cf30a1a1ab..efc7dafad9 100644 --- a/templates/sitemap.twig +++ b/templates/sitemap.twig @@ -49,18 +49,18 @@ {% endif %} {% if categories %} {% for cat in categories %} + {% if posts[cat.term_id] is not empty %}
- {% if posts[cat.term_id] is not empty %}
- {{ cat.name }} + {{ cat.name }}
- {% endif %}
+ {% endif %} {% endfor %} {% endif %}