Jump to content

Alt tag using description not working


Recommended Posts

$content .= "<a href='$large->url' class='thumb-roll'> <img src='$thumb->url' alt='$image->description' /></a>";

How does your code before that part looks like?

I guess you already tried $large->description and $thumb->description. Correct?

Are descriptions set?

Link to comment
Share on other sites

The thumbnails alt tag is working fine now but how would I set the large image alt that it links too

foreach ($page->images as $image) {
        $large = $image->width(1000);
        $thumb = $image->size(400, 400);
        $content .= "<a href='$large->url' class='thumb-roll'> <img src='$thumb->url' alt='$thumb->description' /></a>";

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...