Wordpress Theme Integration TutorialWorldpress Theme Integration Tutorial
This tutorial requires only the most essential HTML and PHP tools: Your preferred source text editors. Whats a templates file? WordPress themes consist of a series of templates. A design must at least contain two executables for it to work, these are index. php and style.css.
But in a well-written design, the content of the index.php filename is divided into the base templates filename (index.php) and a couple of includes filenames. This is the data that contains the headers, pages, and footers codes. Some topics use an extra included for The Loop, which I will discuss in part 4 of this part.
We call these included documents because you are adding source to your index. Phil to tell WordPress to incorporate their content. The index. html is divided into four php files: In the course of this episode, you will extend these data so that your design can contain widgets, menu items, and a ribbon, and you will be able to insert hook used by plug-ins.
You will also be adding additional templates to view different kinds of assets. To get a competitive edge, take a look at the Codex page in the WordPress templates hierarchy. At the moment, however, you are only going to be creating a series of PHP scripts and splitting the index of your index. pdf to them.
Creating empty datasets is the first stage. You will not edit them in this tutorial, but you will do this in the next part of the tutorial section. Now copy the upper part of index. html into your headers. php file.
Now open the index. html and choose everything from the opening DOCTYPE statement to the opening div class="main" tag: Duplicate this source into your headers. Phil files. Store your new headers now. Do the same for the side bar. Choose in your index. html filename the item aside class="sidebar" and everything in it:
Copy this into your side bar. your phone book and store it. Filling the bottom line filling procedure. The php filename is the same as the headers and sidebars. Choose everything according to the side bar in your index. html file: Duplicate it and insert it in your bottom line. pdf-files. Store your filename files.
Maybe you're asking yourself why the major div at the bottom is shut and not at the side bar. If you later create a templates for pages that do not have a side bar, you will miss the side bar included in that templates and the root and the .
Last but not least is the setup of your index.php-files. Somewhat more complicated, you need to append some additional features to your web page that WordPress uses to embed the headers, sidebars, and footers. Now open your empty index. open your empty index. pdf files and insert the following code: Make sure to keep a blank between the opening headers and the sidebars, here you are adding the content of the index files that are not in the headers, sidebars, or footers.
Open your index again. html and choose the whole source between the opening main=dive class item and the sidebar: Copy it and insert it into your index. get_header () below the line of your index. Store your index. directory name. directory. pdf-Datei. Now you have the beginnings of a WordPress theme.
Convert your HTML page to a number of PHP pages and make them work together. The next part of this tutorial will show you how to manipulate the style sheet to make your design work and load your design into WordPress.