As a Preface
In this article we will look at how to use the menus. This is important in order to create a more advanced topic in Sandbox.
WordPress API


If you have been working with the examples previously, then the file functions.php there are a large number of functions for creating a variety of menu items. Due to the fact that in this article we have a practical approach, existing code that was created in previous articles of a cycle, you need to remove. But it’s important to start working in WordPress.

Initially, you need to find a couple of features from previous articles that you have created a sub-item in “Plugins”:

This code is required to remove from the file functions.php. Then remove the functions that are responsible for adding a menu at the top level. This code must be rewritten later, the truth will be a lot of differences from the original version.

The sketches for future options
Before writing code, you need to plan actions. At this point you already have the basic functionality – users have the ability to adjust the visibility of three main containers. This group of options are located in the tab “General” (General). It is possible to find the “Settings” page.

But these three options is not enough for a good theme. At present, almost all use social networks to personal blogs, so you must give users an opportunity to demonstrate links to their accounts on major social networking sites. In order to achieve this, you need to find the item “appearance”.
How to create options?
Your settings page will be more functional for the passage of this series of articles. For this reason, it is helpful to prepare. At the moment your callback function looks like this:

What improvements you need to make?
To specify a picture for the page options in order that it looked organic and fit into the system WordPress. Remove the description from the page. Create a function that will allow you to display errors. It will simplify your work. You need a form that will contain your options. Everything is easy to put into practice. Changed callback function you want to add to your project.

If you have no errors, the settings page should look like the following:

Next, you need to work on the displacement settings.

stranica-nastroek