Thanks, (I just tried it again), but this was one of the things I have tried previously. It seems like the page is isolated from the rest of WordPress. What is written in the file is being called by each page, but the file is not able to retrieve the values of variables, functions or classes from WordPress.