Support » Fixing WordPress » How to create a 1.3 theme/template

  • Note: initially I posted this in the design forum but it didn’t show up so I try here
    It took some time for me to understand how this work so the following can perhaps help those who are long to understand like I am 🙂
    It is probably NOT the correct or official or anything like that way, but it is a way that works for me.
    The 1.3 organization uses two parts :

    1. the theme : the old wp-layout.css file, but in 1.3 it is named style.css that can change the weblog design
    2. the template : the files that can change the weblog behavior
      • index.php
      • wp-comments.php
      • wp-footer.php
      • wp-header.php
      • wp-sidebar.php

    Copy these .php files in a folder and upload this folder in /wp-content/themes, name the folder (for example mybeautifulltemplate)
    Open your css file, and at the very beginning put :

    Template: mybeautifulltemplate
    Theme Name: mydesign-red
    Theme URI:
    Description: somme description.
    Version: version number
    Author: your name or the css file author's name
    Author URI: your uri or css file's author uri

    Copy the css file (don’t forget to name it style.css) in a folder and name the folder (for example mydesign-red)
    So you will have two folders in wp-content/theme, one with the php files, and one with the css file (style.css).
    Go to the admin panel and under the presentation partyou will see amongs the available designs mydesign-red, activate this design
    Note : Be careful, in order for your template to be recognized by the system, the index.php file MUST be in the template folder (even if for your personal use you don’t need to modify it). The other files are not required, if WP doesn’t find them in the template folder, it will look for them in the default directory (/) but the index.php seems to be required, the minimal template is a folder in wp-content/theme with just index.php inside..
    I find this stuff VERY cool event if I don’t change my weblog design every morning, because now you have some kind of “rescue” system if when messing with your file, you screw them. In this case, just rename your css file wp-layout.css, place it at the top level and activate the default design.
    You’ll loose the modification you made (for example I use a popup for “by month” access) but your weblog will still work.
    If you want to change something in the css and are not very sure (it’s easy to screw up things messing with css), just create a copy of style.css, place it in another folder in wp-content/theme. You’ll have a new theme using the same template than the previous one. Activate it in the admin panel, if your not happy just activate the previous design file and you”re back to the previous css.
    What I like with this is that now it’s possible to experiment design changes without fear to break everything
    Hope this helps

Viewing 15 replies - 1 through 15 (of 17 total)
  • isn’t this thread and the same?

    It is true that Odyssey Alpha One shipped with a hacked 1.2 index file. But it makes no difference to the end user at all. By the time we get into Beta we will be using the 1.3 file but it is not necessarily as straightforward as it sounds. eg Will it change between now and then ? A theme builder who wants to develop separate headers etc needs a 1.3 index. But a user who just wants a wide range of style sheets can use Odyssey.
    Plus although you are right to contrast the differences people with heavily customised 1.2 index files needed to know the adjustments necessary to that file in order to achieve the same result. So we started there.

    I know. Isnt it brilliant ?

    Isnt it brilliant ?
    Clearly it is !!
    This 1.3 is trully great !!!!

    Thanks sooo much for sharing. This is great!

    Root, you working on splitting gemini into the multiple files? 🙂

    Yes I am. There are three ways to go. Edit the index. Edit the subsidiary files. Or
    go further than WP and create an extra file(s). (my preferred solution). I must admit that I am not really in a hurry. The only people who need it are theme developers most of whom presumably would want to do their own editing but I am not sure. The Odyssey theme pack is a resource for style sheet designers.
    There might be a need for a different and extra 1.3 Gemini as well. I am also working on building some extra styling hooks into Gemini 3 in the menu area for fancy rollovers. It is tricky and requires the CSS for a nested menu.
    We should remember that it is not out of the question that the devs could reverse themselves on any aspect of this. It can be messy having an Alpha on release but it is really working well in terms of getting feedback and understanding from the community while at least in theory there is scope to change. That represents open source dev at its best and I have to say I think it is a really positive thing.

    Thank you for the help Istelie, I found it very useful. Didn’t find a single search result using the wordpress search function. Came upon this thread through google

    here is what I gathered playing around with the CVS version of 1.3 from the 24th of October. The index.php files needs to be there.The wp-footer.php, wp-header.php and wp-sidebar.php are called from the index.php, so they are not necesserally needed. I also found that the wp-comments.php actually needs to be called comments.php. To sum it up a new template needs a style.css, index.php and a comments.php to work, anything else is up to the template developer.
    Can anybody confirm this?
    A friend told me about wordpress (I didn’t find it on google searching for php blog)
    and I’m very impressed, it’s fun and easy to play around with. I really liked the installer. Template development in 1.3 is also cool.

    I do not wish to discourage any one from taking part in an emerging dialogue about themes – it is still evolving in 1.3 and several of us are beginning to get our heads around it. There are dangers in bits of info being published piecemeal by folks new to it. A theme may consist of a single style sheet. It may consist of a style sheet plus alternative index file. And it may consist of alternative footers, comments and headers. The above post is inaccurate in this regard and may be disregarded. IMHO.

    I don’t get this – I upgraded my blog to the latest alpha and it still is pointing to wp-layout.css rather than styles.css in the main directory… I can see the header PHP file is calling <?php bloginfo(‘stylesheet_url’); ?> however…
    I’ve also created a directory inside wp-content/ … the thing is, it doesn’t show up in my admin interface as a theme… What am I missing? Do I need to put that theme comment header shown above in my wp-styles.css to get it to call my theme director?
    Don’t get it so far…

    The default theme still uses wp-layout.css for backward compatibility purposes. Your theme directory should exist under wp-content/themes/. A style.css must exist in your theme directory for your theme to be recognized as a theme. The theme header is optional but recommended. If you are putting your theme directory directly in wp-content/, that is the problem. Put it in wp-content/themes/.

    Never mind that, I figured out I had to make a Themes directory inside of wp-content before makeing a directory containing the theme itself!
    In the case of the new seperation-of-files in 1.3, what are all the template files I need to copy from the main directory to my theme directory, since I want to start with the default ones?

    to clarify: the only thing different from the default theme in my 1.3 is the CSS file … I want to use the same basic PHP files, but have my own theme named in the admin interface!

    If you want to use the default templates, add a theme comment header to your style.css that includes the following line:
    Template: default
    That tells the theme to use the default templates. All your theme needs to provide in that case is style.css.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘How to create a 1.3 theme/template’ is closed to new replies.