• Resolved Tim

    (@thegreentimtam)


    I need to change the title attribute of my featured images displayed in a loop to

    "#image-<?php the_ID(); ?>"

    in order to get a jQuery banner to display the correct text. Is this possible?

Viewing 1 replies (of 1 total)
  • Thread Starter Tim

    (@thegreentimtam)

    DONE! This is the code that I used:

    <?php if (has_post_thumbnail( $post->ID ) ): ?>
    <?php $image = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post_id ), 'single-post-thumbnail' ); ?>
    <img src="<?php echo $image[0]; ?>" title="#image-<?php the_ID(); ?>" height="500" width="1200"/></a>
    <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Edit Title of Featured Image’ is closed to new replies.