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 :- the theme : the old wp-layout.css file, but in 1.3 it is named
style.css
that can change the weblog design - 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 examplemybeautifulltemplate
)
Open your css file, and at the very beginning put :
/*
Template: mybeautifulltemplate
Theme Name: mydesign-red
Theme URI: https://www.yourwebsite.com
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 itstyle.css
) in a folder and name the folder (for examplemydesign-red
)
So you will have two folders inwp-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 designsmydesign-red
, activate this design
Note : Be careful, in order for your template to be recognized by the system, theindex.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 thetemplate
folder, it will look for them in the default directory (/
) but theindex.php
seems to be required, the minimaltemplate
is a folder inwp-content/theme
with justindex.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 filewp-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 ofstyle.css
, place it in another folder inwp-content/theme
. You’ll have a newtheme
using the sametemplate
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
Luc - the theme : the old wp-layout.css file, but in 1.3 it is named
- The topic ‘How to create a 1.3 theme/template’ is closed to new replies.