Create my own Wordpress Theme

Build your own Wordpress Theme

There is no PHP knowledge required, but you will need Photoshop and CSS knowledge to create your own design. Actually, it was a lot of fun to learn how to develop your own theme from scratch. Header, Footer and Sidebar Worldwide, WordPress has evolved into the most widely used blogs application in the industry, with an estimated 1.5 billion sites now using WordPress on-line..

.. The WordPress works as a blogs, but also as a simple web based CMS, immediately usable with web browser compatible web browsers and full HTML and CSS.... Rich in features, WordPress can be used as a web based web site...

There are so many websites that use WordPress and only about 1,200 topics on, there are necessarily many websites that look exactly the same. Both you and your customers need to differentiate yourself from the crowd or end up being labeled as "just another WordPress blog. "I' ll show you in this tutorial how to create a WordPress design from an HTML and a CSS page style sheet.

Obviously, the WordPress theme is far too extensive to be covered completely in a sole post, so at the end of the day I'll give you some resource to encourage your study. However, it is highly likely that this paper will be a good introductory guide and give you a sound basis for your own WordPress theme creation.

I assume that you already know HTML and CSS and already have a website layout that you want to customize to WordPress. The WordPress topics are stored in a subdirectory in the subdirectory /wp-content/themes/ of your WordPress install. Every topic's folders contains some important components: Single major CMS-sheet. It' just a normal style sheet except for some additional detail at the top, which I will explain later.

Of course you can have more stylesheet if you need it (e.g. a printing stylesheet). index.php, the primary index that WordPress will load when you use the design. Usually these are: headers. php: contains the first part of the page layout, usually beginning with the page type and ending immediately after the page headers (including the location and page titles and navigational elements). side bar. php: similar to the headers. pp filename, it contains items that appear in the side bar.

This can be enabled to work with WordPress widgets, or if you want, you can type the contents directly into the topic file. bottom line. php: usually last accessed on the page, and usually placed from the end of the page to the end of the web page. comments. php: specifies the comment area layout for each article.

When you omit this from your theme, the comment uses the standard theme's comment directory name. Easily attach documents that share a particular page design, such as categorie pages, individual postings, or postings with a particular date. When you have your HTML templates that you can easily change - whether you've rewritten them from the ground up, redesigned them, or purchased them from a templates trading platform - you can quickly change them to a WordPress theme.

Before you start, you will need to install WordPress, which can be downloaded from for free. If you are designing, the simplest way is to edit the file either on your own or on a VM, although you can also work on a web site via FTP. First you need a directory for the topic.

You have to create it in /wp-content/themes/ in your WordPress installer. It' as easy as building a new folder with a name that refers to your design. In this section, you begin with your stylesheet, which also contains some information about the topic that will be used later in the Management area.

Make a custom type sheet with the name Style. Create a custom type sheet with the name stylesheet. Create a custom type sheet with the name style.css and include the following at the beginning of the sheet: It is a comments area ( surrounded by /* and */ ), but WordPress will read this information and present it on the topic selector page in the admin area. For each of these elements, you must paste contents.

They are mainly focused on topics that are spread, so if you only intend to use the topic on your own website, most scores are of little importance. Be sure that the theme name is different from any other theme you have previously uploaded, otherwise there will be a problem! Here, when you convert an already created HTML/CSS page, it should be simple enough to copy and past all your styles information from the source document's own stylesheet into this one.

The next one is the index. directory name. pdf-Datei. So the easiest way to get started is to copy and paste all the contents from the motherHTML to your page style sheet into this new one. We begin by substituting some of the hard-coded information in the document with dynamically created information spontaneously created by WordPress.

WorldPress has a built-in feature named blogsinfo for access to all kinds of information about the installer and the theme. We use this to determine the stylesheet URL and RSS position. bloginfo is very easy to use: This example includes the stylesheet URL, but it works for a number of different parameter, such as character set, log descriptions, and templates folder.

A complete listing can be found in the WordPressCodex. When you look at your templates, you now want to substitute a line like this for the linking item that points to your stylesheet: it will be substituted by the value returned by the feature, which in this case is the address of the page pointing to your stylesheet.

To create WordPress topics, the keys are to go through the entire procedure we have just gone through and reproduce it for each part of the contents on your website: take your current HTML and find the parts of it that you want to integrate dynamic. Then, find the WordPress feature that returns the desired value and paste it, either between the HTML tag or within an attributes, as we did with the stylesheet layout, using the HTML tag as the HTML tag.

Naturally, your style sheet most likely refers to a number of pictures, so it is necessary to move them to your topic list at this point. There are no fixed naming conventions for picture and other property folders within a theme but it is a good idea to add a new property named Property here that contains things like pictures and JavaScript attachments.

You can have separate pictures and separate files if you like, but for the purposes of this item, I think you should stick to a separate asset file. Drag all your pictures to the new directory. Changing all links to the old picture positions that were present before the conversion of the original into a WordPress theme to the new positions.

As a result, all links to the pathname of the new folders where your design is located will be modified. In the asset list the pictures are now located. When the position of the pictures in relation to the style sheet changes, a fast search and replacement from the old to the new name should make this easier.

Now you should have a copy of your HTML, CSS and pictures, all of which are installed and working in WordPress. In order to verify, store it and try to adjust WordPress to use your design and see what happens. They should get a copy of the initial HTML pattern, only now it is created by WordPress.

However, WordPress contents should not yet be included. Here, your website displays only statically HTML included in your submission instead of retrieving WordPress files directly from WordPress. With WordPress, you use templates to tell WordPress what to retrieve and paste into a page.

There is a definite listing of them in WordPress Codex, but if you have gone that far, you have already hit some of them! That' templates day. It feeds all JavaScript or stylesheets needed by the WordPress plug-ins you use. The most WordPress topics use some variations of the following:

At this point, the most common templates you will need are: get_option('home'); bloginfo('rss2_url'); bloginfo('description'); . If your layouts do not have a side bar, there may be other areas of the theme where it would be useful to include these tag (s). tags): wp_list_authors();: list all writers of the blogs as li-elements.

When you have posted, your name is a shortcut to a page that shows all your postings. wp_list_bookmarks();: returns the shortcuts added in the shortcuts section of the admin panels, and is also included in li tag. wp_tag_cloud();: shows a tag of all the shortcuts added to your postings. o Files, such as bodies or any wrapper divs.

No matter if this is the case or not, if you look at the page now, it should contain all the contents dragged from WordPress, with the exception of the page section... Files and implementation of the WordPress loop. Loop is the mechanics that WordPress uses to scroll through the messages to be shown on a particular page and print the contents for each of them.

Both of these rows are used to verify that contributions exist. Different contributions are available according to which page you are currently looking at. As an example, the blogs home page displays a certain number of recent postings. All contributions that belong to this day, or to this catagory or writer are displayed for catagory, day or writer pages.

Now we have to tell WordPress to run a few rows of individual codes for each contribution in the kit. Below the list are the mail times and the authors, packed in small tag. Here are a number of new templates and many others that allow you to customise your templates to show the desired HTML for each one.

F jS, Y' with another PHP date tag character set: Shows the name and link to the archives for the posting creator. tag, as this happens auto-: Shows the name and link to the archives of the post's categories.

It will run as soon as all contributions have been edited. It is possible that a page has no contributions to view (for example, your homepage before you added contributions, or an archival page for a period in which no contributions were published). In this example, we just added a section stating that no contributions were found for the page.

They can also include a checkbox or link to other parts of your site to help users find the information they're looking for. Our basic example (for results ), (for the home page), and a number of other template templates allow you to create to customise each section of your website.

There is much more to create a WordPress theme than what I could of course deal with here. Do you have a query about WordPress?

Mehr zum Thema