Переглянути джерело

Hoverboxen Bild-Alt-Tags geändert für SEO

Moritz Schmidt 9 роки тому
батько
коміт
4a1e45e2ef
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      functions.php

+ 1 - 1
functions.php

@@ -686,7 +686,7 @@ function hoverboxes_shortcode_func($atts) {
             $output .= "<div class=\"relcontainer\">" . PHP_EOL;
               $output .= "<a href=\"" . get_permalink() . "\">" . PHP_EOL;
                 if(has_post_thumbnail()) {
-                  $output .= get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('class' => 'tda-gallery-item')) . PHP_EOL;
+                  $output .= get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('class' => 'tda-gallery-item', 'alt' => (get_post_type() == "tdas" ? "Tag der Architektur " : "") . get_the_title())) . PHP_EOL;
                 }
                 $output .= "<div class=\"tda-hover\">" . PHP_EOL;
                   $output .= "<div class=\"relcontainer\">" . PHP_EOL;