• Resolved therethere

    (@emotionaltrash)


    Hello there,

    I’m trying to manually activate lightbox inside image links on a custom post type i created.

    Here is my example code which i’m testing but no luck. it returns the image and when i click it opens the image itself.

    “Inside” is working which means it seems slb_activate is present on this template.

    $content = "<a href=URL-IMG><img src=URL-IMG /></a>";

    if ( function_exists(‘slb_activate’) ) {
    $content = slb_activate($content);
    echo “inside”;
    }
    echo $content;

    What i’m doing wrong?

    many thanks.

    • This topic was modified 7 years, 10 months ago by therethere.
    • This topic was modified 7 years, 10 months ago by therethere.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, I would recommend ensuring that your links well-formed. For example, attribute values (e.g. href, etc.) should be enclosed by quotes:

    <a href="image-url-here.jpg">Link text</a>

    If you have confirmed that your link elements are well-formed and valid, please provide a link to a page that exhibits the issue you are experiencing and I would be glad to take a closer look.

    Thanks.

    Thread Starter therethere

    (@emotionaltrash)

    yes the problem was the quotes, many thanks! fixed

    Plugin Author Archetyped

    (@archetyped)

    Awesome! Glad to hear your issue was resolved ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Manually slb_activate on custom post type’ is closed to new replies.