The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Using custom includes (1 post)

  1. halmowlez
    Posted 6 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic