There are previously-asked questions but either they don't work with my theme or I'm too stupid to figure them out.
Essentially my chunk of code is below and I'm using the Avada WordPress theme (you might have heard of it). I'm using a child theme. I'm trying to boost my SEO and Google tells me that I need alt text for my featured images (well, all images, but I'm starting here). As opposed to editing 2500 images in all of my reviews, figured it'd be easier to do it via code.
Can someone modify this for me so that it works?
<li>
<?php if ( Avada()->settings->get( 'status_lightbox' ) && Avada()->settings->get( 'status_lightbox_single' ) ) : ?>
<a href="<?php echo esc_url_raw( $attachment_data['url'] ); ?>" data-rel="iLightbox[gallery<?php the_ID(); ?>]" title="<?php echo esc_attr( $attachment_data['caption_attribute'] ); ?>" data-title="<?php echo esc_attr( $attachment_data['title_attribute'] ); ?>" data-caption="<?php echo esc_attr( $attachment_data['caption_attribute'] ); ?>" aria-label="<?php echo esc_attr( $attachment_data['title_attribute'] ); ?>">
<span class="screen-reader-text"><?php esc_attr_e( 'View Larger Image', 'Avada' ); ?></span>
<?php echo get_the_post_thumbnail( $post->ID, 'full' ); ?>
</a>
<?php else : ?>
<?php echo get_the_post_thumbnail( $post->ID, 'full' ); ?>
<?php endif; ?>
</li>