Both for the self-development of a blog with the help of WordPress.Org as well as with WordPress.Com, which gives you space for your own blog, WordPress themes are a good basis for the design and functionality of your blog pages. We will show you how to use existing themes and adapt them to your own requirements. We also provide you with the basics for developing your own templates.
Picture gallery
We have written four small programs to support you. Their function is described in the box at the end of the article. In addition, each program contains an information page, which can be inserted and dimmed with the F1 key. First, start the hfh-mini-starter. With it, you can click on important offline and online addresses and start the other three tools.
The basic structure of a broken-down
If you want to create an individual blog that matches your own wishes, it is easy to create your own theme. But before you decide to invent the wheel again, check out the existing free offer. Right after installing WordPress, you'll find three themes: TwentyTen, TwentyEleven and TwentyTwelve in three subfolders of C.
Also interesting is
Although the names are very similar, you already have three different templates here. By the way, TwentyThirteen is already in work and will probably be added to the next WordPress package. To search for more themes, go to the page wordpress.org/extend/themes.
A look inside
Just click on the button WordPress themes in the Ministarter. There are currently over 1700 ready-made themes available for download. Most likely, many of your wishes, if not all, are already implemented in one of the themes.
If you have found a theme that is close to your perceptions, take a look at the functionality. First, click the image in the Themes directory and then click the image on the theme page. If you want to insert one of the themes into your WordPress, download it from the net and simply unzip it into the Themes folder
Here a new subfolder with the name of the theme is created. Every theme in one of these subfolders is automatically displayed in the WordPress interface. With the variety of themes, you'll probably find one that saves you the work of redesign.
But even if you have not found a theme that suits your needs, it is often enough to expand an existing theme. For this we give you suggestions and tips. Knowledge in HTML, XHTML and, above all, PHP and CSS help you. You'll find more information on this later in the section Create a child theme.
Before you make the transformation of a finished theme or even the design of your own, you need to know how a theme works in WordPress. A theme consists of a variety of php files and other mainly css files, all stored in a precisely defined folder structure.
Occasionally you can also find txt files. These are e.g. Readme.txt or license. Txt. The latter usually contains the GPL, under which all free themes are published. This license allows you to use parts or a whole theme for your own developments. So we can build our own theme.
Two files are the core files, essential for any theme. Each time the blog is started, the first index is used. Php. The file corresponds to the main file or procedure required in most programming systems. It is like a command center from which the sequences are controlled.
Here is a concept that you will always hear about the themes: "The Loop". This is the main feature of WordPress that performs all other actions to load and view the blog. It may also be that the loop is in one or more php files.
In this loop the main work is done in the blog: The database, in which the pages, articles, pictures, archives and other elements of the blog are stored, is searched for the individual elements. For this purpose, further subscreens are used.
Templates, plug-ins and hooks
This is also a special feature of WordPress: the file hierarchy. The index.php arrange further files under staggered. If one of these files is missing, the next higher-level task takes place. The second essential file is style.css. In it and, most often, other css files is the design of the blog, formatting and layout defined.
The easiest way to get familiar with WordPress themes is to look at the folder and file structure. This is easy with the hfh-mini-filefinder.
Create your own child theme to an existing
To compare the three themes TwentyTen, TwentyEleven and TwentyTwelve, you need an application in which you can open the associated file contents.
This is quite simple, because all WordPress files are pure text files. The correct representation depends solely on the text editor used. If you have not installed a separate text editor, it is usually the Notepad named Microsoft texter in php files.
However, this makes the texts of almost all files found in WordPress hard to read. Alternatively, use the PSPad editor. This editor is a very comfortable code editor and not only suitable for php files, but also HTML, Perl, C and other programming languages.
Exclusive help programs
It has a lot of features to help you work with the themes.
Take a closer look at the files of a theme with this editor. You can use your new editor. We use the hfh-minieditor, which allows for easier encoding. Go to the index.php file. It is the file with which a theme starts. The full tag - you call such lines template tag - looks like
Php get_header ();?>
This tag includes header.php and consists of WordPress-specific PHP snippets. They call functions or load items from the database. In our example, the tag retrieves the header. In this form, they are also referred to as template include tags. As an ordinary PHP tag this would look like
Php include (, header.php ')?>
However, in WordPress, you should use template tags, as they allow more flexible features.
The following tag contains the loop The Loop, again with enclosed comment lines.
Php get_template_part (, loop ',, in dex');?>
This is followed by the template include tags for the sidebar and footer calls.
Php get_sidebar ();?> Php get_footer ();?>
The loop contains the code that will output the various pages and articles of your blog and all other information, such as time, comments, comments, etc.
This brief entry must suffice here, since a detailed analysis would go beyond the scope of this article. Unfortunately, the number of German-language textbooks on the subject is not exactly Legion, so you need to access the most English-language pages on the web.
Use the hfh-mini-starter for example. To get more information on the English-language Codex pages. On hooks, with whose plugins plug into WordPress. For a list of current hooks, see adambrown.info/p/wp_hooks/version/3.5. Unfortunately, the American manual is not so far that it has something to say on all tags.
You do not have to create an entirely new one to get an individualized theme. Instead, expand the functionality of the WordPress theme with a so-called Child Theme. In this context, the original theme is logically referred to as a parent theme. The child inherits the functionality of its parent. This is not changed.
Only the parent theme must always be present at the same time, since the child accesses the functionality of the parent. An additional folder with the name of the Child Theme is only created in wp-content / themes. Let's say you want to create a child to TwentyTwelve. Then you must first create a folder in the Themes main folder.
For example, TwentyTwelve_Child call. This folder must have a working style.css. This file completely replaces the parent. This is why you can simply copy the stylesheet.css of the parent to the child folder. You only need to add the template line shown below.
The header of the file could look like the parent theme.
/ * Theme Name: Twenty Twelve Child Theme URI: http://example.com/ Description: Child theme for the Twenty Twelve theme Author: Author Name Author URI: http://xxxxx.de/about/ Template: twentytwelve Version: 0.1 .0 * /
The meaning of the parameters can be found in the table
After the shooting * / the regular StyleSheet code follows. If you do not want to make any major changes, you can also omit the Parent-style.css into your child folder. In this case, you must import the file. This is done with this code in your style.css
/ * ThemeName: Twentytwelve Child Description: Child theme for the twen tytwelve theme Author: Authorname Template: twentytwelve * / @import url ("../twintwelve / style .css"); h1.site-title a {color: # FF0000
It is important that the import line is the first statement after the header. Here we change with the h1 ... line the color of the heading. Now your child should be visible in the Themes section of the WordPress dashboard. Enable it.
For more information on the WordPress theme, see
Use the program to create lists of all files or folders in the area you specify. Always the whole paths are held. The program can be used without major instructions. It is important that you need only a few mouse clicks for complex structures. It is, like the others, programmed with VB.NET and can be used on Windows computers without installation.
This program is a simple text editor with an integrated notepad. Important for WordPress developers is that the problem of the missing ASC (13) (description in the article) is solved with a mouse click. Batch processing of multiple files is also integrated.
The optimal Colorfinder for all programmers :. It lists the named colors, displays the AR GB values determined by sliders, and the gray values.
The hfh-mini-starter was created especially for readers who want to save themselves the annoying address search and constant input in the browser. If you have installed WordPress locally, the buttons on the left are for direct access to XAMPP, phpMyAdmin and the WP-Login.
Download: Table
No comments:
Post a Comment