As you can see you haven’t inserted an alt text in your code:
<img src="<?php the_sub_field('post_slider_image');?>">
So you would need that. What return value are you using in your image field settings? Must be URL. So you would need to change that into “Image Array”.
In your code you would define the image as:
<?php $image = get_sub_field('image'); ?>
And print it out like:
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
Also, the has_sub_field function is outdated, see:
have_rows was added in 4.3.0:
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.