Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » Media Library alt tag not taking affect

  • I’m using image field so the client can upload their own homepage slider images. When uploading an image through the media library, you are given an option to set an alternate text. However when you do this, and then hit ‘use as field value’, the changes do not save and the alternate text does not apply.
    The alt text right now is just using the url to the image.

    I’m using this line in my template file to output the image:
    <?php echo(types_render_field("billboard-img", array("arg1"=>"val1"))); ?>

    If there is no way to get this alt text field to work, I can settle with just extracting the url for this, so I could create another field for the alt text.

    <img src='<?php echo(types_render_field("billboard-img", array("arg1"=>"val1"))); ?>' alt='<?php echo(types_render_field("alternate-text", array("arg1"=>"val1"))); ?>' />

    Any ideas?

Viewing 1 replies (of 1 total)
  • Update:
    I realized that I have to click the “Save All Changes” button in order for the alt text to take affect. In my media library now, the alternate text is displaying as I want it to, but in the markup the alt text is still just the url of the image. What is going on!?

Viewing 1 replies (of 1 total)
  • The topic ‘Media Library alt tag not taking affect’ is closed to new replies.