• I’m trying to add like a Pinterest ‘Pin it’ button to my lightbox images

    In order to make this work it needs to get the image URL, but the like box doesn’t display the image URL

    The JS code:
    image: '<img class="esgbox-image" src="{href}" alt="" />'

    How can I get it to display: https://www.website.com/image.jpg

    WP codes like: get_post_thumbnail_id() only work if the URL is displayed in the browser window

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Apologies, I don’t think anyone can understand your question. get_post_thumbnail_id() works fine without URLs, it has nothing to do with URLs, only IDs. Are you trying to determine the image URL yourself, or is your code trying to determine the URL? Do you want the URL to display so you can determine the URL, or so anyone can see the URL?

    If you just need to know the URL yourself for some reason, you should be able to determine it using your browser’s developer tools. For example, Firefox’s View Page Info tool has a media tab that lists all image URLs used on a page.

Viewing 1 replies (of 1 total)
  • The topic ‘Display lightbox image URL ?’ is closed to new replies.