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

    The Alt, Title, Width, Height are missing from the $placeholder images on the home page and portfolio page images.

    Can you please tell me how to correct this?



    The placeholder images use the kriesi_build_image function to put the code together for the images.

    This currently doesn’t provide the option to include alt or title tags however the width and height are specified in the placeholder image code:

    $placeholder_image1 = kriesi_build_image(array('url'=>$placeholder_image1,'height'=>'124','width'=>'280'));

    If alt and title attributes are required, I’d suggest changing the code to include the full image code, for example:

    <a href="#" title="MY TITLE TEXT"><img src="PATH/TO/IMAGE.JPG" alt="MY ALT TEXT" /></a>



    for the place holder the code is as follows:

    $placeholder_image1 = get_bloginfo(‘template_url’).’/files/image1.jpg’;

    $placeholder_image1 = kriesi_build_image(array(‘url’=>$placeholder_image1,’height’=>’124′,’width’=>’260’));

    The next section that holds the description text is $placeholder[1] = $placeholder_image1.'<h3>, so I am not sure what to do when written in this format.

    Where in this code do I add the title and alt info. I am aware of how to make standard links with proper alt and titles, but the above is what holds the image code for the Main Index Page. Also, the width and height attributes do not show in the physical code, so for image one the search engine sees no alt, no title and no dimensions:

    <div class=”box box_small box1″>

    < img src=”” alt=”” / ><h3>First Title</h3>

    text description goes here


    It should read

    <div class=”box box_small box1″>

    < img src=”” alt=”what I want for alt” title=”what I want for title” / ><h3>First Title</h3>

    text description goes here


    * I had to space the img brackets so that you could see the code here in the forum


    Additionally, the small images on the portfolio page is not showing alt, title, dimensions as well

    so the image url is just < img src=whatever.jpg” alt=” “>

    For both of these and my original question, I want to know where and how to fix these.

    I read on another template where you explained how to go into the code and handle this, but it does not apply to this particular template as that file was not in the folder to download and adjust by ftp.

    I think that template had a kriesi_build_image.php


    You can modify following line in kriesi_build_image.php located in the folder framework.

    $image[1] = '" alt=""

    to something like

    $image[1] = '" alt="'.get_title().'" title="'.get_title().'"';


    It’s not easily possible to add width, height and dynamic alt content.


    Thank you, but this resulted in an error.


    Yep – a syntax error. I updated the code above.

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

The topic ‘Alt, Title, Width, Height – home page and portfolio page’ is closed to new replies.