sliders image alt attribute field
-
slider image don’t have alt, how can i fix this issue any idea?
found on ../plugins/carousel-horizontal-posts-content-slider/chpcs.php
line 340
$slider_gallery.= '<span class="chpcs_img"><a href="'.$post_link.'">'.$this->get_post_image($post->ID,$image_size).'</a></span>';
line 404-427
/* Get image url */ public function get_post_image($post_image_id, $img_size) { if (has_post_thumbnail( $post_image_id ) ): $img_arr = wp_get_attachment_image_src( get_post_thumbnail_id( $post_image_id ), $img_size ); $first_img = $img_arr[0]; endif; if(empty($first_img)) { if(empty($this->options['settings']['default_image_url'])) { $first_img = plugins_url('assets/images/default-image.jpg', __FILE__); } else { $first_img = $this->options['settings']['default_image_url']; } } $first_img = "<img src='". $first_img. "' />"; return $first_img; }
here i want like this on line 425
$first_img = "<img src='". $first_img. "' alt='"try to getting image ids alt info"' />";
but cant figure out..
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘sliders image alt attribute field’ is closed to new replies.