Viewing 1 replies (of 1 total)
  • This is how i get around there being no alt tags.

    Add the code below to line 188 in the class-wppninja-bootstrap-gallery-public.php file, which is located in the plugins public folder:

    $alt_text = trim(strip_tags( $thumbnail_info->post_title ));

    Then add the code below to the img tag on line 192:

    alt='”.$alt_text.”‘

    This will then retrieve what you have entered into the image’s Title field and display it in the image’s alt tag.

    i’m yet to figure out how to retrieve the data from the image’s alt field, but for now this way gets the job done so that the images aren’t missing the all important alt tags.

    I hope this helps.

    • This reply was modified 7 years, 6 months ago by megaheff.
    • This reply was modified 7 years, 6 months ago by bdbrown.
Viewing 1 replies (of 1 total)
  • The topic ‘No ALT tag on images’ is closed to new replies.