Support

Account

Home Forums General Issues How to use ALT tags Reply To: How to use ALT tags

  • Hi Michelle,

    You have to add it inside the loop.. And of course the function should only be added once in functions.php.

    Also, make sure you change the fieldname (the first parameter) to the correct one AND also that the field is set to output the image ID.

    If you want to use it outside of the loop you could change it to this:

    
    
    <?php 
    global $post;
    echo get_image_with_alt('NAME OF THE IMAGE FIELD', $post->ID, 'thumbnail'); ?>