How to include a php file in every post and page [duplicate]

Place your file in the same directory as the template. On the single.php and page.php files you’ll want to include:

<?php include('your_file.php'); ?>