Jump to content

Wordpress gallery link to parent-page


Elena702
 Share

Recommended Posts

Hello everyone,
I need urgent help with a PHP code. I work as a web developer with wordpress and elementor and have now received an order from a customer to include a photo gallery that redirects to the page in which the image is included by clicking on it. I have integrated the gallery, the redirection works already to some extent, but I have the problem that some images do not have a parent ID. Now I have already contacted the wordpress support, they told me that I have to change a php-file to pick out the parent ID automatically. But unfortunately I have no idea about PHP and I don’t know where to insert this code.
Would be very very great if someone could help me!

This is the code I need to implement:

https://developer.wordpress.org/reference/functions/wp_get_attachment_link/

and this is the file where it has to included:
https://docs.google.com/document/d/10w3AllVEmdTlsrziVM0nxs5WpytIjexocB31hJbvP4E/edit

Thank you in advance!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.