Disk imaging is a bunch in Google. You need to create a script with ajax query to create a php function that will this to handle a request and return a result (in your case to give the content of a post by its id), and to allow the use of ajax on the front.
See the documentation here
wp-kama.ru/id_2018/ajax-v-wordpress.html
Here
popovses.net/wordpress-development/ajax-wordpress.html
https://habrahabr.ru/company/dataart/blog/271189/
It would wish to understand..