Site logo

Archived topic

Output Multiple Single Posts from One Custom Post Type?

1 reply · Started by Brent Wilson on May 26, 2022

Viewing posts 1–2 of 2

On a website with a custom post type for events, I have used an element to create the single post template. But along with the "normal" single-post output, is there a way to also generate a registration thank-you page element that also pulls data from the same custom post type? So basically, I could create a single event and have two "pages" generated that both dynamically pull data from that one event? Is this even possible with elements and dynamic data?

Hi there,

tricky one - its not something that elements or dynamic data would have any direct control over. As they rely on the code being 'hooked' inside a loop, and its the loop that specifies the post type and the ID of the post you want to display.

For example if you considered the Thank You page as a static page, you could use WPSP or the new GB Query Loop Block to output a single post that you specify. Which is great if you're happy to use static pages and select a specific single post for each.

The tough part is - how does the Thank you page know what Post ID to use ?

This archived topic is closed to new replies.