Deleting multiple header and footer.php's

I’m finding my exported Pinegrow Wordpress files have multiple header.php and footer.php files. This is probably down to how i’ve created new pages but, aside from my front-page.php, every header is the same and, every footer is the same throughout so I only need a front-page-header.php, a header.php and a footer.php.
I did originally have different content in each as I left the ‘Site Content’ Wordpress action on Pinegrow standard ‘Site Inner’ but, Ive amended all that now to ensure ‘Site Content’ starts immediately after the Nav and ends immediately before the footer.

I know I can manually delete these and edit their respective theme files, it works fine in doing so but, is their a way to do this within Pinegrow to automate it?

Hi Jan
To make a ‘universal’ head/foot:

  1. create one in the Library (lib.html) - make it a component and re-use it on all pages (except front if you need) via the LIB menu.
    or 2. create index.html, do the head/foot. Then save the page as whatever.html (to create a copy) and edit that to create new pages.
    If you create a head/foot on each page, or use the template pages, PG will treat each as unique, so give multi h/f.php
    It will also do unique H/F if you set the page as a Master (in WP options).
    Hope that helps
1 Like

Hi @digismith
Thanks for your advice. Re-using the component ‘Nav’ and 'Footer" I made on the lib page was actually the way I was going about it originally but I must have got lost somewhere along the way.
I’ve also tried your second option. Index.php is the one page that actually had just ‘Get Head’ and ‘Get Footer.’ So I duplicated it and renamed and just added the content from the other pages into the site content and alas, It’s still rendered ‘About-page-template-new’, ‘front-page-new’ headers and footers.

I think I’ll have to continue as I am. It’s fine editing the exported files afterwards. My only gripe with it is that if I ever need to open the Pinegrow project again for any other edits, I’m going to have to go through the same process next time.

I appreciate your input and it’s a lesson to be learned for making my next project. Cheers.

Hey @Jan

Lesson no. 1: In your All HTML pages there must be one master page rest must be derived from that by unchecking “This is The Master Page” option and type index.html in the corresponding name action check screenshot

Lesson no. 2: If you somehow wants another header-xxxx.php and footer-xxxx.php file for your another post type or as you mentioned for front-page.php as header-front-page.php and footer-front-page.php then you need to select following option from Panel.

i hope these 2 lessons and images will help you to understand what is the difference between headers and footer and how to create multiple headers and footers.

Thank You!
LEO

1 Like

Hi @itsmeleo sorry for the late reply. I had to leave that project for a while but I think you’ve hit the nail on the head there. Every time I’ve seen “Use Master Page” it’s always pointed to index.html. However, (and I think this is probably a newbie mistake) I pointed all pages of my site to use front-page.html, since that was to be the ‘Front Page.’ No doubt this is where I’ve gone wrong as the ‘Front Page’ header was different from all others.

Thanks for your advice, I’m building a different site at the minute but already implementing your advice so, it should all work out this time.