Pinegrow WordPress Part 2 | How to Create WordPress Headers and Footers Pinegrow

Pinegrow Tutorial

Approx Time: 3.5 Minutes

If you haven’t already, check out the previous post on generating the WordPress theme in Pinegrow. This video series will form a complete guide on creating a WordPress theme in Pinegrow. Download the source files for the project here.

WordPress Theme Structure – Creating the WordPress Header & Footer PHP Files in Pinegrow

The page we added the WordPress site action to is our master page. This will control the header and footer of our theme.

A WordPress theme should have a separate Header and Footer file that contains the code that is the same across the rest of the pages of the theme. Such as navigation menus and footer areas.

These are header dot php and footer dot php.

Header.php typically consists of the theme styles and some scripts, which are added via php from the function dot PHP file. This is added to pages using the PHP function get header. A navigation menu is usually included also, sometimes called via a template part. More on that later in the tutorial.

Footer.php usually consists of the footer area of the site, often converted to a widget area and the javascript ( also added via PHP) of the theme. It is added to the pages using the get footer PHP function.

Let’s create this structure in Pinegrow.

Our page should be divided into 3 main sections. Header, Main and Footer.

Everything above the Main HTML tag will be the theme header and everything below it will go into footer.php.

Everything else inside the main.html tag will be index.php

Click on main.

Assign the site content action to the main element.

This will automatically generate Header and footer PHP files.

Save and export the theme.

When the theme exports, header.php and footer.php should now be located in your themes folder.

Useful Resources.

WP Codex get header

WP Codex get footer


Flash Sale:  5 Plugins Bundle for $47