How to Use the Sidebar and Footer Templates in WordPress Twenty Fifteen
WordPress uses the Sidebar, and Footer templates to call your information into your website. Sidebars and footers provide you with a great opportunity for branding. Customizing these elements allows you to consistently brand your content.
The Sidebar template
The filename of the default Sidebar template is sidebar.php. Typically, the sidebar is displayed on the right or left side of your WordPress template. In the default Twenty Fifteen theme, the sidebar is displayed on the right side of the template, by default.
The Sidebar template is called into the Header template, which is called into the Main Index template. The Sidebar template gets called in using this template tag (as seen in header.php in the Twenty Fifteen theme):
<?php get_sidebar(): ?>
This code calls the Sidebar template and all the information it contains into your blog page. There are some additional ways you can call in the Sidebar template, including having multiple Sidebar templates and using an include statement to pull them into the Main Index template.
The Footer template
The filename of the Footer template is footer.php. Usually, the footer sits at the bottom of the page and contains brief information about the site, such as copyright statements, credits to the theme designer or hosting company, or even a list of links to other pages within the site.
The default Twenty Fifteen theme shows a statement that says “Proudly powered by WordPress.” You can use the footer to include all sorts of information about your site, however; you don’t have to restrict it to small bits of information. Here, you find the typical footer that you see in the default Twenty Fifteen theme.
Similarly to the Header and Sidebar templates, the Footer template is called into the Main Index template through this bit of code:
<?php get_footer(); ?>
You can write calls for the Sidebar and Footer templates that are written as part of a larger call:
<?php get_sidebar(); get_footer(); ?>
It is possible, and common, to wrap two template tags in one PHP function like that, if they appear directly after one another.
This code calls the Footer and all the information it contains into your website page.