I’ve tried to make modifications to the slick-front-end.php file to get the alt tags to display in the html.
$loop = new WP_Query($args);
$images = array();
$output = ”;
while ($loop->have_posts()) {
$loop->the_post();
$image = get_the_post_thumbnail(get_the_ID(), ‘full’);
if (!empty($image)) {
$post_id = get_the_ID();
$title = get_the_title();
$alt = get_post_meta($img_id , ‘_wp_attachment_image_alt’, true );
$content = get_the_excerpt();;
$image_src = wp_get_attachment_image_src(get_post_thumbnail_id(), ‘full’);
$image_src = $image_src[0];
$url = get_post_meta(get_the_ID(), ‘slickc_image_url’);
$url_openblank = get_post_meta(get_the_ID(), ‘slickc_image_url_openblank’);
$images[] = array(
‘post_id’ => $post_id,
‘title’ => $title,
‘alt’ => $alt,
‘content’ => $content,
‘image’ => $image,
‘img_src’ => $image_src,
‘url’ => esc_url($url[0]),
‘open_blank’ => $url_openblank[0],
);
}
}
return $images;
You can see where I have added the $alt function and then below that the ‘alt’ parameter in the array. And then for the display, further down in the code:
<?php echo $linkstart ?>
” title=”<?php echo esc_html($image[‘title’]) ?>” alt=”<?php echo $image[‘alt’] ?>” />
<?php echo $linkend ?>
The alt tag is there, but remains empty. Any suggestions on getting this to generate my alt tag for the image?
]]>I’m sure that I’m missing something trivial, but was wondering if there’s an option for ‘slidesToShow’ in media queries within the settings.
]]>I just installed this plugin for slick carousel on my development site. I would like to know if there is a way to add the category title of the current slider above the carousel. Any ideas?
]]>WordPress converts shortcode attributes to lowercase while your code expects them to be in camelCase. Therefor most custom values one tries to override via the shortcode for an individual slider will not be picked up.
]]>Hi! How is it possible to use the “Slider syncing” setting or any other sample used the slick library page (https://kenwheeler.github.io/slick/) ?
]]>If I want to change the arrow colors as well as the size of the arrows, which page should i edit if the plugin is already hosted on my website.
]]>hi – great plugin – working great.
I would like to be able to choose the size of the pictures displayed in the carousel if possible.
Is there any way to choose one of the various automatically generated media sizes when selecting the featured image? I’m trying to get all the images sized the same and using the thumbnail, medium or large size would do this. ie. each image has automatically created extra files for it in wordpress and they have the size tagged on to their url eg. image-150×150. If we could select in options to use the thumbnail, medium, large or full size then I could get all the pictures to be the same size.
Is that possible?
]]>how to use this plugin. what are the shortcodes of php codes?
]]>