I have written a Zend application and have included WordPress for blogging. When I first installed WordPress I themed it so that it used the same header etc as the main application. I have since redone the main theme twice and had to redo the WordPress theme to match. Is there a way for WordPress to use my Zend layout? My first thoughts are to break up my layout into header/footer files and include them from WordPress using the full paths. Although it would work, it is far from ideal (I would prefer to keep the layout file in one piece).
I have written a Zend application and have included WordPress for blogging. When I
Share
For many websites you may need to install WordPress for blogging integration. When it comes to skinning the blog you are pretty much limited to copying the html from your Zend_Layout into the WordPress header.php and footer.php files. This is duplication, and if you make any changes to your layout, you will need to update the blog theme as well. Well, there is another way!
Alter Your Zend Application
Make a separate bootstrap file for your Zend application (for example by following this guide: Access Zend Application Resouces from Other Applications).
In your index.php file, to run your application:
WordPress Magic
Now comes the WordPress magic.
Get Zend Layout
In your new WordPress theme folder, create a file named ‘Zend_Layout.php’ and copy/paste this code into it:
Header
Change the header.php file to:
This will load the $layout variable from the previous script and echo everything up to your main container div.
Footer
The footer.php is similar: