Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Archetyped

    (@archetyped)

    Thread Starter Integrantsvs

    (@bdwatt0)

    Thanks. I looked at that tutorial already but don’t see how it will work for me. Of course, I could be missing what you’re saying… I’m pulling the images from advanced custom fields dynamically within the page template. Here’s the code:

    `<?php $image_ids = get_field(‘trgallery’, false, false);
    $shortcode = ‘[gallery ids="' . implode(',', $image_ids) . '"]‘;
    $gallery = do_shortcode( $shortcode );
    echo slb_activate($gallery);?> `

    How do I get this to show up behind a text link?

    Thread Starter Integrantsvs

    (@bdwatt0)

    Hi again, Archetyped! I’m just wondering if you can be of any help here. I’m at a loss – pretty noob to PHP. Thanks again!

    Plugin Author Archetyped

    (@archetyped)

    The basic technique in the tutorial is to display one link and hide the rest via CSS. SLB activates links in a post regardless of whether they are hidden by CSS or not.

    One approach is to extract the first ID from your list of attachment IDs and display it separately. Then, generate the gallery for the rest of the IDs and hide them via CSS.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Advanced Custom Fields Gallery behind a text link’ is closed to new replies.