Using a PHP include in wordpress

Home/Web Resources/Using a PHP include in wordpress

After a little messing around I decided to use this method to show a menu across a website as an include so it can be easily updated in one place. I am not a fan of most of the menu plugins that come with wordpress and would rather use this method. I hard code the following code into the header of my theme. An example is below. This can refer to any directory or file on your server that is the include file.

<?php include($_SERVER[‘DOCUMENT_ROOT’]."/includes/"); ?>

Enjoy. Some other methods can be found here.