0
votes

I have a custom post 'event'. For each post there is a gallery attached. On a main galley page i am displaying featured images from each post . Now i want that when person clicks on this featured image , he should be taken to a new template where images from the attached gallery of the post are displayed using get_post_gallery(). I can use permalink because it will take me to the 'single-event'.

How can i do it ? Please help me out.

1
So you want to redirect the user to the gallery when he clicks the featured image? - shish
Yup this is what i want to do - amritanshu

1 Answers

0
votes

One way is to install a plugin called Page Links To. Basically you install the plugin, activate it then go to your media files. In the bottom you will see a section which will ask you:

Point this content to:

  1. Its normal WordPress URL
  2. A custom URL

Pick the second option and enter the desired URL.

You can enter the desired URL in another way aswell. When you add an image to a post, an options tree shows up. Somewhere are URL settings. Feel free to check that out too. In my opinion that plugins makes it so easy to use and redirect.