• Resolved qpaq

    (@omerkanipak)


    I’m looking for ways to open the gallery images created by Pods plugin in CPT posts to be opened in new tabs. Each thumbnail is linked to its own media file but they open in the current tab.

    Is there a way to achieve this? There are no settings in Pods for this. The media assets are in a different subdomain, is this a problem?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    I believe this isn’t supported for WordPress galleries.
    Maybe a plugin can help you here like: https://www.wpbeginner.com/plugins/how-to-add-custom-links-to-gallery-images-in-wordpress/

    Thread Starter qpaq

    (@omerkanipak)

    Thanks Jory, tried this method with Gallery Custom Links plugin but didn’t resolve the issue. It would have been good if Pods have this feature integrated.

    Plugin Author Jory Hogeveen

    (@keraweb)

    Since we are using the core gallery function from WordPress we rely on it’s features and unfortunately this isn’t one of them. If WordPress would add this feature to it’s default gallery we will definitely add it in the field options.

    For now I think it’s best to create a Pods template where you can define your own requirements.

    Cheers, Jory

    Thread Starter qpaq

    (@omerkanipak)

    Thank you, Jory, for your quick response. I’ll find another way then. Maybe using pods template as you’ve suggested.

    Plugin Author Jory Hogeveen

    (@keraweb)

    No problem!

    Please check the each loop we provide. Example:

    [each images]
    <a href="{@permalink}" target="_blank">
        {@_img.medium}
    </a>
    [/each]

    Documentation: https://docs.pods.io/displaying-pods/template-tags/each-loop-tag/

    Cheers, Jory

    Thread Starter qpaq

    (@omerkanipak)

    That really worked, thank you Jory. The only problem left is to find a way to make the images distributed evenly.

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @omerkanipak

    That will require custom CSS or the use of a CSS framework with column classes (like Bootstrap).
    WordPress includes this in their galleries but if you go custom then you need to add this yourself.
    I guess you could also just use the same classes WordPress does.

    Cheers, Jory

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘open gallery images in new tab’ is closed to new replies.