Would there be a way to edit the blog listing page source code to add a conditional to see if the URL is a "tag" or a "author" and remove the featured images from those listing pages?
"<div class="post-item"> {% if not simple_list_page %} {% if content.post_list_summary_featured_image %} <div class="hs-featured-image-wrapper"> <a href="{{content.absolute_url}}" title="" class="hs-featured-image-link"> <img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image"> </a> </div> {% endif %}"
I am not a developer but feel comfortable making small edits in the code if this would be a fairly easy function.
with the combined tag/author if statement, so it would look like this:
{% if !tag && !blog_author %}
{% if content.post_list_summary_featured_image %}
<div class="hs-featured-image-wrapper">
<a href="{{content.absolute_url}}" title="" class="hs-featured-image-link">
<img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image">
</a>
</div>
{% endif %}
{% else %}
{# if you need to replace the image with something else, do it here #}
{% endif %}
The text in between {# #} is a comment in HubL, so you can replace that with something else in place of the featured image or just leave it like that to not add anything else.
So essentially replace the first part from your code with the wrapped version.
✔️ Did this post help answer your query? Help the community by marking it as a solution.
Yes, there are tag and author conditionals for the blog listing page.
If user is viewing the Tag blog listing page:
{% if tag %} your code here... {% endif %}
If user is viewing the Author blog listing page:
{% if blog_author %} your code here... {% endif %}
You can combine these two and create a rule that will show a featured image if the listing page is neither Author nor Tag. Below is an example that would show the featured image if blog listing is not tag and not author, but if it is (else), it would show a custom featured image.
with the combined tag/author if statement, so it would look like this:
{% if !tag && !blog_author %}
{% if content.post_list_summary_featured_image %}
<div class="hs-featured-image-wrapper">
<a href="{{content.absolute_url}}" title="" class="hs-featured-image-link">
<img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image">
</a>
</div>
{% endif %}
{% else %}
{# if you need to replace the image with something else, do it here #}
{% endif %}
The text in between {# #} is a comment in HubL, so you can replace that with something else in place of the featured image or just leave it like that to not add anything else.
So essentially replace the first part from your code with the wrapped version.
✔️ Did this post help answer your query? Help the community by marking it as a solution.