Tag Info

New answers tagged


Try require('inc/test.php'); instead of require('/inc/test.php'); Remove / before inc.


If you check https://codex.wordpress.org/Function_Reference/get_template_directory_uri You will see get_template_directory_uri() returns a uri, not a server path. You should use instead the get_template_directory() function: include get_template_directory() . 'subdir/filename.php'; For a plugin you can use the plugin_dir_path() function: include ...

Top 50 recent answers are included