alt attribute is missing: wp_get_attachment_image_src
-
Hi there!
At my homepage I have three ‘featured blocks’. Those blocks have an image above. But those are missing the alt attribute.
My homepage has it’s own php-file: page_home.php. The blocks are defenied by this code:
<div class=”span4″>
<?php
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘your_thumb_handle’ );
?>
” />
<div class=”homeblokcontent”><?php the_content(); ?></div>
</div><!–span4–>Has anyone an idea how I can add the alt attribute? I am searching for hours, but online I only find the situation for thumbnail from blog posts. And that is not the case.
If I change the line with the img src to this:
” />
I get an unexpected syntax error due to ‘=’ and the page doesn’t load anymore.
Hope you can help me!
Regards, JessieThe page I need help with: [log in to see the link]
- The topic ‘alt attribute is missing: wp_get_attachment_image_src’ is closed to new replies.