2

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?

Edd
  • 3,724
  • 3
  • 26
  • 33
mark-in-motion
  • 263
  • 6
  • 23
  • 1
    Just include their file in your WP header/footer respectively? Modify what you need to remove the redundant code and that's pretty much it. use `require_once("filename.php")` for that – casraf Jul 08 '13 at 09:44
  • add get_header() for header and for footer get_footer() on your site – Vikas Gautam Jul 08 '13 at 09:47

1 Answers1

5

You can pull wordpress stuffs by doing

require($_SERVER['DOCUMENT_ROOT'].'/wp-load.php');

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

require($_SERVER['DOCUMENT_ROOT'].'/wordpress/wp-load.php');

Then you are clear to use wordpress functions and can pull the header like this:

get_header();

And footer:

get_footer();
phoenixsoap
  • 51
  • 1
  • 3