We began this project without using wordpress, and have a significant amount of code related to user and access control that we would like included on CERTAIN pages in the site (namely the shop). We are using woocommerce as our cart, and we need to have the ability to connect our existing database of users to the site so that non employees can still use the front end while the shop that we want to create using woocommerce will only be accessible to people who have an account on the employee portal. The Directory for all the non-wordpress is in a folder below wordpress, or in other words, wordpress is at the root, and our project is in a directory below the root.
We began this project without using wordpress, and have a significant amount of code related to user and access control that we would like included on CERTAIN pages in the site (namely the shop). We are using woocommerce as our cart, and we need to have the ability to connect our existing database of users to the site so that non employees can still use the front end while the shop that we want to create using woocommerce will only be accessible to people who have an account on the employee portal. The Directory for all the non-wordpress is in a folder below wordpress, or in other words, wordpress is at the root, and our project is in a directory below the root.
It's not clear where you need to add this additional code. But I would assume that it is in 'include'-type files that you need to run in the portion of the generated page.
So, to do that, use the add_action('wp_head','your-function-name')
to load your external function file:
add_action('wp_head','include_my_include');
function include_my_include() {
include get_template_directory() . 'your-function-file.php';
return;
}
See here: https://codex.wordpress/Function_Reference/get_template_directory .
This code would be in your theme's (Child Theme, hopefully) function.php file.