Alt text on featured images
-
Hi – thanks for a great plug-in. I am using it on a redevelop for a client’s website, so they can put videos on their site.
Can you take a look at the following for me:————————————–
<?php query_posts('category_name=news&showposts=6'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="newsbox">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if(get_video_thumbnail()!=null) { echo
‘<imgsrc="'.get_video_thumbnail().'" alt="<?php the_title(); ?>"
class="video-thumbnail">'; } elseif(has_post_thumbnail())
{
the_post_thumbnail(); }; ?>`
<?php if(get_video_thumbnail()!=null) echo '<img src="/img/play-
button.png” alt=”play video” width=”40px” class=”overlay”>’; ?>`
<a href="<?php the_permalink(); ?>"
title="<?php the_title(); ?>"><h3><?php the_title(); ?></h3></a>
<?php the_excerpt(); ?>
</div>
<?php endwhile;?>
<?php rewind_posts(); ?>
————————————–
[I’m finding it very difficult to post code on here!]
————————————–The
alt="<?php the_title(); ?>"
just reproduces itself in the source, without actually pulling the title for the alt.
I would welcome your help with it.
regards
David
- The topic ‘Alt text on featured images’ is closed to new replies.