Images des annonces : seul le titre peut servir de légende
Les légendes des médias ne sont plus jamais affichées sous les images des annonces et des séances. Le titre de l'image s'affiche uniquement quand « Afficher le titre des images en légende » est cochée ; sinon, aucune légende. WordPress remplit automatiquement la légende à l'upload à partir des métadonnées EXIF/IPTC du fichier (ex. « Screenshot » pour les captures macOS), ce qui faisait apparaître un texte malgré la case décochée.
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<div class="swiper-slide">
|
||||
<figure>
|
||||
<img src="{{ img.url }}" alt="{{ img.alt }}" loading="lazy">
|
||||
{% set legend = article.show_image_titles and img.title ? img.title : img.caption %}
|
||||
{% set legend = article.show_image_titles ? img.title : '' %}
|
||||
{% if legend %}
|
||||
<figcaption>{{ legend }}</figcaption>
|
||||
{% endif %}
|
||||
@@ -67,7 +67,7 @@
|
||||
{% for img in landscape_images %}
|
||||
<figure>
|
||||
<img src="{{ img.url }}" alt="{{ img.alt }}" loading="lazy">
|
||||
{% set legend = article.show_image_titles and img.title ? img.title : img.caption %}
|
||||
{% set legend = article.show_image_titles ? img.title : '' %}
|
||||
{% if legend %}
|
||||
<figcaption>{{ legend }}</figcaption>
|
||||
{% endif %}
|
||||
@@ -93,7 +93,7 @@
|
||||
<div class="swiper-slide">
|
||||
<figure class="sidebar-portrait">
|
||||
<img src="{{ img.url }}" alt="{{ img.alt }}" loading="lazy">
|
||||
{% set legend = article.show_image_titles and img.title ? img.title : img.caption %}
|
||||
{% set legend = article.show_image_titles ? img.title : '' %}
|
||||
{% if legend %}
|
||||
<figcaption>{{ legend }}</figcaption>
|
||||
{% endif %}
|
||||
@@ -107,7 +107,7 @@
|
||||
{% else %}
|
||||
<figure class="sidebar-portrait">
|
||||
<img src="{{ portrait_images[0].url }}" alt="{{ portrait_images[0].alt }}" loading="lazy">
|
||||
{% set legend = article.show_image_titles and portrait_images[0].title ? portrait_images[0].title : portrait_images[0].caption %}
|
||||
{% set legend = article.show_image_titles ? portrait_images[0].title : '' %}
|
||||
{% if legend %}
|
||||
<figcaption>{{ legend }}</figcaption>
|
||||
{% endif %}
|
||||
@@ -353,7 +353,7 @@
|
||||
{% for img in s.images %}
|
||||
<figure>
|
||||
<img src="{{ img.url }}" alt="{{ img.alt }}" loading="lazy">
|
||||
{% set legend = s.show_image_titles and img.title ? img.title : img.caption %}
|
||||
{% set legend = s.show_image_titles ? img.title : '' %}
|
||||
{% if legend %}
|
||||
<figcaption>{{ legend }}</figcaption>
|
||||
{% endif %}
|
||||
@@ -444,7 +444,7 @@
|
||||
{% for img in s.images %}
|
||||
<figure>
|
||||
<img src="{{ img.url }}" alt="{{ img.alt }}" loading="lazy">
|
||||
{% set legend = s.show_image_titles and img.title ? img.title : img.caption %}
|
||||
{% set legend = s.show_image_titles ? img.title : '' %}
|
||||
{% if legend %}
|
||||
<figcaption>{{ legend }}</figcaption>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user