Magento Header into WordPress

How to pull the Magento header and footer into WordPress

Update: Notice this post is 5+ years old which means this post is ancient in the online world. Some or all of the solution in this post may or may not work currently for your project.

Recently I had a client that was running a Magento eCommerce store and wanted to use WordPress as their blog CMS. That is all fine and dandy as we just installed WordPress in a subdirectory and had it up and running in no time. The next tasks was to make the WordPress blog look like it is integrated into the Magento store by pulling the Magento header and footer into the WordPress theme.

To do this, I ended up using cURL to fetch the HTML of the Magento header between two comment tags.. For example, here is the header.php of the WordPress theme.

Read More