On my registration site I have a CPT called "event". In my "Events" page I list these events and create a "register" link for each one towards the "Registration" page:
$events = new WP_Query( array( 'post_type' => 'event' ) ); while ( $events->have_posts() ) : $events->the_post(); ?> <a href='<?php bloginfo("wpurl"); ?>/registration'>register</a> <?php endwhile;
In my "Registration" page, I want to retrieve the $events->post->ID value corresponding to the event that has been clicked. How to do that?