I need to add some partner logo images inside my custom theme. I'm using the WordPress gallery and the get_post_gallery() function to obtain the images URL that I will use to display the single logo images. I'm facing a problem now because I need to add an unique link for each image and these links will be different. I can't use plugins, someone has suggested that I install custom images gallery plugin, but I'm unable to find a filter I can use or a good tutorial on how to add this possibility to WordPress gallery. Any help will be appreciated.

  • Try doing it like this - you can then do something like <a href="https://example.com"><img ...></a> – Sally CJ Nov 2 at 17:22
  • This will output the images src, I need to associate also an unique link for each image!I know how to output a link tag, the problem is how to set the href of the tag in wordpress! – sialfa Nov 2 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.