How to Create a Secondary WordPress Footer for Select Pages (Widgetized)

The fun part of digital marketing are the unpredictable situations you find yourself. I consider myself a relatively smart guy, but even I come into situations that make me say, “hmmmmm.”

Here is a tutorial on how to create a secondary Wordpress Footer to appear on select pages, and how to make it widgetized. When finished you will have unique footers show up for pages on your website, so the Contact Page can have a different footer than the Index Page.

This is a low to medium level tutorial and basic HTML, CSS, PHP and WordPress architecture knowledge is recommended.

[line] [column width=”1/2″ first=”yes”]

Synopsis:

A client wants a different footer on the “contact page” of his WordPress website. The client desires that the main footer stay the same on all other pages except the “contact page.”
So essentially he wants two footers. The client also needs the footer to be widgetized so he can manage text and links in the future.

[/column] [column width=”1/2″ last=”yes”]

Approach:

I reviewed his WordPress site, footer.php, functions.php and sidebar.php files to see how everything is currently functioning.
I noticed the footer was already widgetized and that I would now have to create a separate footer for the contact page.[/column]

This it how it was done.

Step 1: Duplicate the Sidebar Footer:

First, let’s create a new sidebar. Your template should/might have a ‘sidebar-footer.php.’ You need to duplicate ‘sidebar-footer.php’ and rename it to ‘sidebar-footer2.php.’
[NOTE: This sidebar will be your second footer widget. You will be able to add Widgets to the footer.]

Every sidebar.php file is different depending on the WordPress template you have. In general you need to replace any script that relates to the sidebar.php, with the below snippet.

Step 3: Connecting pages to WordPress Functions.php

The next step is to find the functions.php file. We need add some snippet to the ‘functions.php’ file, which will connect WordPress infrastructure to the files you just created above (‘footer2.php’ and ‘sidebar-footer2.php).

The next step is to find the place in the ‘functions.php’ file with sidebar code, usually it looks like this: // Sidebars.