This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

"undefined" tag on PP Lightbox photos

  • Creator
    Topic
  • #7736
    socialkenya
    Member

    Clicking on photo thumbnails pulls up the beautiful PrettyPhoto Lightbox, but there’s “undefined” sitting in the lower left corner where the title or description should be. I’ve tried adding ALT tags and TITLE tags to photos in the Text view, editing photos and including titles and descriptions in the Media Library, and jumping up and down while pulling my hair out.

    None of these seem to have any effect on this odd little tag. It just won’t go away. I’ve Googled around and around for a solution, but most are specific to other themes and not at all helpful, as I can’t edit the PrettyPhoto part of Akita (or can I?).

    You can see this in action if you go to http://www.multiani.com/equatoriateak and click any of the small photos on the front page.

    Oh, and I inspected the “undefined” element and found this bit of code:

    <p class="pp_description" style="display: block; ">undefined</p>

    Any ideas for me?

    Thanks,
    JC

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #7763
    Jason Bobich
    Keymaster

    In prettyPhoto, this corresponds to the title attribute of the anchor tag that links to the lightbox popup.

    <a href="image.jpg" rel="themeblvd_lightbox" title="THIS IS THE TITLE">
            <img src="thumb.jpg" />
    </a>

    If you want the title to be blank, and not say undefined, you still need to have it in there.

    <a href="image.jpg" rel="themeblvd_lightbox" title="">
            <img src="thumb.jpg" />
    </a>
    #7769
    socialkenya
    Member

    So, putting a title into the image properties in WordPress’s Edit Image interface doesn’t actually fix this problem; I’ve got to go into the HTML on each image and add a blank title or an actual title. I did that, and, yep, it works–but it sure would be nice if PrettyPhoto had a tip about that. 😉

    Thanks. Worked like a charm. Now I’ve just got to fix the HTML for all the other images that open in Lightbox.

    Cheers,
    JC

    #7772
    Jason Bobich
    Keymaster

    Well, it is logical if you think about the markup though. The actual image inside doesn’t have anything to do with prettyPhoto. The only relevant thing that prettyPhoto is using is the anchor tag. In other words —

    <a href="image.jpg" rel="themeblvd_lightbox" title="">
    THIS COULD BE ANYTHING
    </a>
    #7773
    socialkenya
    Member

    Yep, I can see that, but it would still be cool if adding a title inside the WordPress image editor would add the title tag to the image HTML and kill that “undefined” text. Kind of adds an extra step if you’ve got to go into the HTML and create titles (or no titles) for each and every clickable lightbox image.

    Just glad I didn’t have 100 images to update!

    Cheers,
    JC

    #7786
    Jason Bobich
    Keymaster

    This is probably a moot point now, and I apologize for not pointing this out before, but if anyone else is having this issue, you can always just hide that item within your Child theme’s stylesheet.

    .pp_description { display: none; }

    Just one other approach if you wanted to hide this title element without going to every page/post you’ve used this and modifying it.

Viewing 5 replies - 1 through 5 (of 5 total)

The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.