Support » Fixing WordPress » Using custom includes

  • I’ve found something I don’t understand – hope someone can enlighten me!

    I’ve been moving a static site over to WP and wanted to use a PHP include to replace the old HTML version. So I created the PHP file and put it in my old includes folder (in the root). But in the WP template I kept getting the path wrong.

    I was playing around with <?php include(‘wp-includes/file.php’); ?> and discovered that this works — even though file.php is not in that directory but in my old ‘includes’ directory.

    I’m happy that it works — but how did WP find that file? Should I move it to the ‘wp-includes’ directory? But if I did, would it get overwritten if I do an automatic upgrade in the future?

  • The topic ‘Using custom includes’ is closed to new replies.