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 Lightbox photos

  • Creator
    Topic
  • #8108
    gooweb
    Member

    Hi,

    I have the same problem than this user :
    http://support.themeblvd.com/forums/topic/undefined-tag-on-pp-lightbox-photos/

    But it’s not the same forum, I bought Complexity, so I can’t read your answers. 🙂

    My question is : is there a way to remove the word “undefined” of the lightbox pictures ?
    The best way for me would be to display the caption, but it’s okay too if I just remove it.

    Thanks.

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

    Hello,

    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 or anything, you still need to have it in there like this —

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

    I tried before to put a title on my pictures, but it didn’t work.
    http://tinypic.com/r/1zogljt/5

    Also, I don’t understand which file I need to edit, in order to remove the default title “undefined”. Can you be more specific please ?

    Need I to edit every piece of code ?

    Thanks.

    #8120
    Jason Bobich
    Keymaster

    I understand the confusion; this could definitely be integrated into the WP editor more seemlessly, but as of now, does require HTML editing.

    So, there’s no file you need to edit. It just has to do with how you link to the lightbox popup in your HTML of the page or post you’re editing.

    How are you making the image link to the lightbox? You’re following this video, right? — https://vimeo.com/32560047

    So, that means you had to edit the HTML of the image by clicking the “Text” tab (previously called “HTML” prior to WordPress 3.5, as seen in the video) when editing your page or post, and then you had to add the rel="themeblvd_lightbox" part to the anchor tag.

    In this process, when you’re editing the anchor tag <a>, you need to make sure it has a title attribute. This title attribute of the link is what the third-party prettyPhoto plugin uses for the lightbox caption.

    So right now when you click over to the “Text” tab in your WordPress editor, and look at the image’s HTML, you’ll have something like this with no title attribute:

    <a href="image.jpg" rel="themeblvd_lightbox">
            <img src="thumb.jpg" />
    </a>

    But instead, you need to add a title attribute to the anchor <a> like this:

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

    Make sense?

    #8195
    Jason Bobich
    Keymaster

    New feature coming soon, inspired by the confusion in this topic 🙂

    https://twitter.com/jasonbobich/status/332576765870485504

Viewing 4 replies - 1 through 4 (of 4 total)
  • The forum ‘Commodore WordPress Theme (formerly Complexity)’ is closed to new topics and replies.