I am trying to make download page with download link defined in posts custom field.
I want download pages to look like
/download?p=id
I found many sites using this kind of download links. Is there actually a simple solution for this? A plugin for instance? From my understanding i would have to make page template where i set up page as i want and as for the part i want to change based on post id i pull it out of custom field. Then making shortcode to insert download page link in posts.
EDIT
Based on Rarst answer i managed to make some progress.
1.Allowing endpoints such as ?id=
add_rewrite_endpoint( 'id', EP_PERMALINK | EP_PAGES );
2.Pulling out custom field from post based on permalink id.
<?php echo get_post_meta($_GET['id'], 'link', true); ?>
Now i have to figure out how to make posts shortlinks not easy to guess one by one and make shortcode. Any idea?