Creating custom Landing Page templates.

Summary

This document is for helping developers create their own landing page templates as well as for assisting users with copying/modifying existing templates into new templates.

It is not meant to help users use their WordPress theme as a landing page template (see: http://docs.inboundnow.com/guide/default-wp-themes/ ).

This document also assumes and requires that the reader has basic PHP, HTML, CSS & WordPress skillsets, and will also encourage development of those skillsets.

Best of luck to everyone!

Editing Landing Page Templates

We ship about 8 landing page template with our core Landing Page plugin.

These core templates are hosted in a different location from custom installed landing page templates and premium landing page templates.

It’s very important to know that because these templates are shipped with core, whenever we update Landing Pages plugin any changes made to these core templates will be discarded.

For that reason if you ever want to modify a core landing page template make sure to create a copy of it first and add that copy to the /wp-content/uploads/landing-pages/templates/ folder.

Where are the core landing page templates hosted?

Core templates that are shipped with the plugin are located in the following directory:

/wp-content/plugins/landing-pages/templates/

Note that these templates should never be edited in this location because edits WILL be overwritten on plugin update.

Also custom templates should never be created in this directory nor premium templates uploaded into this directory.

We have a different location for custom and premium landing page templates.

Where do custom & premium Landing Page templates go?

Landing page templates are hosted in the following directory:

/wp-content/uploads/landing-pages/templates/

So a landing page template folder would look like this:

/wp-content/uploads/landing-pages/templates/my-custom-template/

Template file structure:

A landing page template has two mandatory files:

  1. config.php – helps define what settings will power the landing page
  2. index.php – renders the landing page template.

Thumbnail.png

This image asset will be used to visual represent your custom landing page template when selecting templates from the template select screen.

Config.php

The config.php controls the landing page template options which are the main dynamic settings of the landing page template.

Index.php

The index.php file manages the rendering of your landing page. It contains a mix of PHP & HTML.

The Assets Folder

The assets folder is optional.If you have javascript files or css files you would like to load through your index.php file then we recommend storing them in and calling them from the assets folder to keep your landing page’s assets well organized.