I have programming experience from PHP but now I am creating a WordPress theme which is a bit mixture.I have a blog which contains posts , when a user click on a post i want to show the clicked
Homepage: Contains a loop for displaying all posts
May be steps below should do it
receive.php as template, add
<?php /* Template Name: theTemplateName */ ?> at the beginning of template file.
Create a page, give it a slug, let say
the-receiver, make sure you select
theTemplateName as its template.
Now, create a form inside
single.php, give an (hidden) input with value from
get_the_ID(), set it POST/GET whatever suits you, and the action to
site_url('/the-receiver'), match the url to the slug the page that is using your receiver template name. Watch now button should submit the form.
Inside the file/template
receiver.php, do your stuff.