Support » Plugin: Waving Portfolio » Alt Text and Titles on Portfolio Images & Links

  • Resolved SomeGuy

    (@timfell)


    I am working on a project to help optimize the content of a site for search engines and all of the images and links within this plugin are not pulling the alt text and titles for the images and anchors within the portfolio.

    I have looked through the waving-portfolio.php file to see where this issue might be originating and the lines that add the images and links for the modals and lightbox do not pull alt text or titles.

    I am looking for a quick fix to add some lines of php to that file so that the hundreds of images and links have alt text and titles attributed to them.

    Here is what that section of the file looks like currently on the site I am working on.

    `if($width != 0){
    $image_code = ‘<img src=”‘.$image[0].'” style=”width:’.$width.’px” />’;
    }else
    {
    $image_code = ‘<img src=”‘.$image[0].'” style=”height:’.$height.’px” >’;
    }`

    So how do I add something to those lines of code to make it pull the alt text and title of the image from the media library?

    https://wordpress.org/plugins/waving-portfolio/

Viewing 4 replies - 1 through 4 (of 4 total)
  • aelbuni, this is a very time sensitive issue, a prompt reply would be greatly appreciated. If I am heading in the wrong direction please let me know but either way I do need to attribute the alt text and title to the images asap. Thanks in advance!

    I found a workaround for part of the issue but I think in the future you should look into adding a way to control or incorporate the individual image titles and alt texts into the portfolio galleries. For both the thumbnails and the blown up images within the light-box popups.

    From what I discovered the complicated part comes in because the portfolio gallery is itself a post and pulling the alt text from its post id gives you the featured image’s alt text but I have found no way of pulling the alt text for the other images within the gallery that are not the featured image.

    My work around is:

    alt=”‘.$alt.’ Photo ‘.$counter++.'”

    This makes each image in a particular portfolio gallery have an alt text like `alt=”Car Shots Photo 1″‘. I still have not figured out a workaround for the images contained within the LB portion of the plugin though so that is my next project.

    Aside from these issues I do really like this plugin, quite user friendly!

    Plugin Author aelbuni

    (@aelbuni)

    Hello Timfell,

    Sorry for the delay, as I was quite busy with my study.

    I was doing a review to answer support tickets, and actually when I searched I found the same question posted in stackoverflow.com first, so I did actually commit an update according to your valuable feedback.

    Please find my detailed answer here:
    http://stackoverflow.com/questions/35349071/alt-text-and-titles-on-portfolio-images-and-links-waving-portfolio

    Wish you the best

    Aelbuni,

    Thank you for the update it works well. I think the biggest thing that still remains is making the plugin pull thumbnail sized images instead of full sized ones for the galleries. It definitely slows page load speed way down.

    I will post on another support ticket for this issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Alt Text and Titles on Portfolio Images & Links’ is closed to new replies.