I have a featured news banner on the site that I only want to display on EN pages (as we only have press coverage in English). I have written the module to pull the most recent post on our News Blog that has the correct tags. However, the banner isn’t showing on the newsroom or our blog page. I noticed this on another page we don’t have a multi-language translation for, and when I set the page language to “EN” instead of the default “search” value on the page editor it fixed the problem. However since blog summary pages are not editable from the website page edit, I’m not sure how to fix these pages.
Here is what I have for the featured news banner:
{% if content.language.languageTag == “en” %}
{% set tag_posts = blog_recent_tag_posts(‘24638575721’, [‘press-release’], 1) %}
{% for tag_post in tag_posts %}
<p class=“featured-news”><span class=“featured-news_content”> <a style=“color: #ffffff;” href=‘{{ tag_post.url }}’>{{ tag_post.name }}</a></span><i class=“fal fa-arrow-circle-right featured-news_arrow”></i></p>
{% endfor %}
{% endif %}