Correct and safe way to include php content in my page

  1. Duplicate the post.php in your theme folder.

  2. Rename that file as any_name.php

  3. Enter the following code at the top of that file.

< ?php /* Template Name: Any Name */ ?>

  1. Add your php codes to that file.

  2. Go to admin panel — > Create a new page — > Select your template and publish the page

tech