How Do You Call a PHP File From a WordPress Page?

If you want to call a PHP file from a WordPress page, you can use the include() function. For example, to include the my_custom_php.php file from your site’s main theme folder, you would use the following code:

include(“my_custom_php.php”);

You can also use the wp_include() function to include files in WordPress. This function takes two arguments: the path to the file you want to include and the WP_INCLUDE_PATH setting.

The WP_INCLUDE_PATH setting tells WordPress where to look for include files. By default, WordPress searches for include files in the wp-includes folder.