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.
The goal of this article is for 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 to facilitate changes. Note: This video is a continuation of Part 1, so check out the other video.
Steps to follow
To create your first WordPress theme, you will need two main steps:
- Fix the errors and show all the basic information; and
- Edit static content to make it dynamic.
How to fix errors and bring up all basic information
- On your design that you have created, if you click on “inspect”, you will see 404 errors displayed. These errors show that there are links that are missing and therefore that you must insert.
- After the previous modifications, save the page and update your “template” to update the modifications made.
- There is another type of error at the free lancer level (we will not 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 so that it becomes dynamic.
- If you open the page.php file, the information presented is still static. This would mean that you cannot modify them without entering the Backend code. So you have to replace the information to be able to modify it in the background without always starting again in the code.
- Go to the page.php file and locate the place where startboostrap is located
- You can set the WordPress post global variable. This is to make it possible to call up the information of a page directly from the page on which we are working. You won’t need to re-enter the Backend code every time you make changes.
- Go to header.php and set the variable overall post. Recover the title of the page and replace it with your title of your choice.
- Then save and refresh your template and you will see the changes you have 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.
Hope this video has helped you learn how to create your first WordPress theme. Please do not hesitate to contact us if you have any questions.