I have a WordPress site but its Registration Page (which is integrated with PayPal) is not part of the WordPress site (Some other developer is doing this and it’s in PHP). Now the problem is whenever I change some bits in the footer or the header (especially the links), I will need to download this external PHP file, change the links there too and then upload it again.
It’s a tedious task and prone to mistakes. They won’t let me handle the registration form in WordPress so I’m stuck with this workflow for now.
Can I include my WordPress footer and header within their PHP file so that we are just using the same file?
You can pull wordpress stuffs by doing
NOTE in this example the wordpress install is in the document root of the site. If, for example, your wordpress is installed as yourdomain.com/wordpress/ then modify the above code to
Then you are clear to use wordpress functions and can pull the header like this:
And footer: