Answer for SEO Query – Image Alt Text replaced with generic text in HMTL

Perfect. Thanks Kevin. With your example I figured out how to change the other sections in the template-home.php but…. I just couldn’t figure out how to change the image line for the portfolio section. This section is coded slightly different and doesn’t have $variable to reference and pass to your new function. I’ve tried a few names but couldn’t get anything to work… The below is the code line in the portfolio section i need to change <img src=”<?php echo wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) ); ?>” alt=”project”> This is your code and dont know what to put in the red text so that it works ? <?php echo get_post_meta( get_attachment_id_by_url( $service_slide[‘image’] ), ‘_wp_attachment_image_alt’, true ); ?>” Can you please advise and then I am sorted 🙂 Thanks Charles