facebook

create your first WordPress theme - Part 2.

We will see how to create a WordPress theme from HTML 5. This video is Part Two of the “How to Create a WordPress Theme from HTML 5” video. Video tutorials and articles under 350 words

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.

Goal

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.
  • Go to function.php and add the JavaScript files. Go to header.php, open the JavaScript files, copy or cut these files and paste in function.php. So you can transform the links into basic WordPress functions.

Note: WordPress uses a function called wp_script to display javascript files.

  • In the structure of wp_script, there are several parameters. The first parameter is the name of the link you added. You must therefore always make sure that the name is unique for each javascript that you will have to add.
  • 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.

Read also

Subscribe to receive our news straight to your inbox.

X