I am displaying a gallery of custom post types. When the user clicks a post, instead of redirecting to a single template, I want it to redirect to another page (too easy just change the link since all redirects go to the next gallery), but I want to be able to use the metadata related to the clicked post on a screen later in the process. In example:
I have three pages. Page one is a gallery of photos using wp_query to display all of my "Photos". Page two is a gallery of "Substrates". Page three is a page that will show the meta data about the photo such as Title and Location and beneath it the substrate data such as Material and Color.
When a user clicks a photo on page one they will be redirected to page two to select a substrate. When a user clicks the substrate they will be taken to page three to show them all the meta about their choices.
How do I collect this info to be used on page three? In my working, non-WP example I added an onclick function to every item displayed. When click is detected, I add variables to localStorage and save the values. Then redirect to next gallery. On page three I'd simply call all the variables from localStorage using JS. I think I can implement this in the WP site but should I be saving the post ID and then when I am ready to display the info about the selections I make a db call? What is the best way to achieve this type of result?