Custom logo for wordpress template

Many premium WordPress templates have settings page, which is a very handy tool for those who are not know languages markup or programming.
As a rule, on settings page you can change the logo, color scheme of the site, the location of the ad units or counters. And not need to change the code of the template.
But what if your theme does not have a settings page? In today’s lesson we will try to create and connect this page. Example will allow us to specify the selected image as a custom logo in header.
All described in the example code you can put in your theme’s functions.php, but personally I prefer the other way:

1 – create a catalog template file settings.php – this is file where we will write our code
2 – in the functions.php file add the line include_once (‘settings.php’);

By using the get_option we get an array with the values of form. Because the field we have called custom_logo, a reference to the logo will be stored in $options[‘custom_logo’]. We show $options[‘custom_logo’] or default image.

That’s all. I hope, now you are convinced that the creation of settings page for WordPress template is simple. If something is not clear, or have additional questions – them as you can always leave in the comments.