This video is the second part of the video on "how to create a Wordpress theme from HTML 5". The video is currently available on our YouTube channel. At the end of this video combined with the other videos, you will be able to create your first Wordpress theme.

Objective

The purpose of this article is to allow you to create a WordPress theme with all the basic information. You will also be able to make the content of your WordPress theme dynamic so that it will be easy to modify. Note: This video is the continuation of the first part, so feel free to watch the other video.

Steps to follow

To create your first WordPress theme, you will need two main steps:
  • Fix errors and bring up all the basic information; and
  • Modify static content to make it dynamic.

How to fix errors and make all basic information appear

  • On your design that you have created, if you click on "inspect", you will see errors type 404 displayed. These errors show that there are links that are missing and therefore you need to insert them.
  • Go to function.php and add the java script files. Go to header.php, open the javascript files, copy or cut these files and paste them into function.php. This way you could turn the links into basic WordPress functions.
Note: WordPress uses a function called wp_script to display the javascript files.
  • In the structure of wp_script, there are several parameters . The first parameter is the name of the link you added. So you should always make sure that the name is unique for each javascript you add. After the previous modifications, save the page and refresh your template to update the changes made.
  • There is another type of error in the freelancer (we won't deal with this error for the moment). You just need to make sure that the basic information is there.
  • If you go back to "inspect", you will see the files you replaced at the bottom of the page.
So you already have all your basic information and all you have to do is make your content dynamic.

How to modify the static content that is on the site to make it dynamic.

  • If you open the file page.php, the information presented is still static. This mean that you can't modify them without going into the back end code. So you have to replace the information to be able to modify them in the background without always going back into the code.
  • Go to the page.php file and locate where startboostrap is located. You can set the global post variable for WordPress. This is to allow you to call up information from a page directly from the page you are working on. You won't need to re-enter the back end code every time you make changes.
  • Go to header.php and set the global post variable. Retrieve the page title and replace it with your chosen title.
  • Then save and refresh your template and you will see the changes you made.
So basically you can go to header.php and replace the existing information with your information, then save and refresh your template to see the information.I hope this video has helped you learn how to create your first wordPress theme. Feel free to contact us if you have any questions.