The first step is add that sidebar we will make in file functions.php.Enter the script in below in to file functions.php
The number 2 in script so that 2 sidebar,and for adding change the number be 3 or 4 up to you.Then Update file,and now we make the file php.Make via cpanel on directory/public_html/wp_content/themes/(nameyourthemes) with click new file.Make file with extension is .php,example new_sidebar.php then fill that file with code in below:
Adjust the number (3) the amount that you will create a sidebar,then save the file.After that we just edit the files template as index.php, single.php, page.php.Add this code in below to call the new sidebar file:
Sometimes there is a different template contents file function.php.For example like this:
If as is usually the only themes hava a file sidebar.php containing some sidebar.Actually, we can change the file functions.php become such a way earlier but more hassle of having to divide the sidebar file becoming fragmented.Should we just edit the file functions.php.
Copypaste sidebar code at the bottom it
looks like:
Don't forget for change the name that sidebar(that red colour),click update file or save.And nowwe open sidebar.php file.If before we have installed the widget on the
sidebar there is a long time it will be many
widget code. But about the contents of the
main code is like this:
Copypaste live in below sidebar old code
and change the name sidebarnya, it looks
like:
(Note:replace single quotes (') and quotes two (")
in the code above)
OK!! now it was over, now what about the
results of your practice?
No comments:
Post a Comment