i created 4 header and 4 footer widgets using a site spesific plugin, the reason been that when i change themes, i keep all of my widgets. i created two files, one for the header widgets and one for the footer widgets. what i need to do now is to add these to the header and footer files.
at this stage i'm putting the following code manually in my header at the bottom after my header closing tag:
<? if ( is_front_page() ) : ?> <?php get_sidebar( 'homepage' ); ?> <?php endif ; ?>`
and the following code in my footer at the top:
<?php get_sidebar( 'footer1' ); ?>
How can i insert these codes automatically into my header and footer files from my plugin.