Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1160

    I have been searching through the PHP files trying to find out where the output for the home page slider is built so I can have it automatically take the image title and use that for the Alt Tag. Pasted below is a copy of the output of my page of the area I am trying to change, as you can see the Alt tag is blank, where in the PHP is that output built so I can change it to fill in the Alt tag:

    `<!– ###################################################################### –>

    <div class=”feature_wrap”>

    <!– ###################################################################### –>

    <ul class=’slideshow aviaslider’>

    <li class=’featured featured1′>

    <span>

    <img src=’REMOVED’ alt=” title=’Check Out Our New Truck Side Logo’ /></span>

    <!– end .featured –>

    <li class=’featured featured2′>

    <a href=’http://www.choreboyz.net/our-company/’>

    <img src=’REMOVED’ alt=” title=’Check Out Our New Truck Rear Logo’ /></a>

    <!– end .featured –>

    <!– end .featured_inside –>

    <!– ###################################################################### –>

    </div><!– end featuredwrap –>

    <!– ###################################################################### –>`

    #34222

    Please use backtick ( ` ) to post code.

    To fill the alt attribute with text you need to modifiy kriesi_post_thumb.php which is located under avisio > framework > helper_functions

    Replace this line:

    $defaultimage = $linkwrap[0]."<img ".$img_attr_string." src='".$image_URL."' alt='' title='".get_the_title()."' height='".$option['wh']['height'] ." ' width='".$option['wh']['width'] ."' />".$linkwrap[1];

    with:

    $defaultimage = $linkwrap[0]."<img ".$img_attr_string." src='".$image_URL."' alt='".get_the_title()."' title='".get_the_title()."' height='".$option['wh']['height'] ." ' width='".$option['wh']['width'] ."' />".$linkwrap[1];

    The Dude

    #34223

    You are the man! I should have asked, with that same line above, rather than using the image title, when you view the image in WordPress Media section it has a field for the Alt Attribute, is there a way to use that rather than the title? If not the title will do fine.

    If I may, I might suggest implementing this into your next version, as this is a big SEO thing, to make sure all images have an alt title. Your template is just wonderful and small updates like this are what make it top notch, thank you!

    #34224

    Have a look at this page: http://wordpress.org/support/topic/get-alternate-text-from-attachments

    Maybe this solution works – you need to write

    alt='".$alt."'

    instead of

    alt='".get_the_title()."'

    and copy&paste this line

    $alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true);
    if(count($alt)) echo $alt;

    before the code I posted above. I’ve not tested it though.

    #34225

    I’m attempting to get this to work over in the BrightBox theme… Which PHP file controls that lightbox pop-up with someone clicks on an image…?

    Thnx

    #34226

    Just to be complete in what I’m looking for…

    Using Brightbox: the prettyphoto plugin currently pulls up the “Caption” text that is defined in WP Media Manager for any particular photo, but it doesn’t display the Title, Alt or Description elements.

    I would specifically like to include either the Alt or Description elements in the prettyphoto pop-ups for my images.

    I can see over on http://www.no-margin-for-errors.com that prettyphoto is perfectly capable of displaying what I want… but I can’t find where it is being called from the theme itself…

    #34227

    Hey,

    yes – the Lightbox Javascript currently doesn’t support all attributes. I reported it to Kriesi some time ago but I’m not sure if he’ll release an update. However an user: http://www.kriesi.at/support/topic/pretty-photo-does-not-show-description posted a custom mod.

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Alt Tag in Slider Images’ is closed to new replies.