Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi! Yes, it’s possible, but you have to use a different approach. External featured images are saved as post’s metas. By default:

    • _nelioefi_url: contains the URL of the external featured image.
    • _nelioefi_alt: contains the ALT attribute of the external featured image.

    If you want to add the ALT text as a caption, you have to access that meta property:

    <?php
    $alt_text = get_post_meta( get_the_ID(), '_nelioefi_alt', true );
    if ( !empty( $alt_text ) ) : ?>
    <p class="post-image-caption"><?php echo $alt_text; ?></p>
    <?php endif; ?>

    I hope this helps you!

    And, please, do not forget to rate and/or comment on our plugin 🙂

    Thread Starter paradigmshiftkey

    (@paradigmshiftkey)

    Perfect! Thank you 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Alt attribute display in content?’ is closed to new replies.