On: 2005/09/03
Shorter URL for this page: http://ozh.in/ko

In every WordPress theme there are places that are supposed to be edited and customized by the end user who is using the theme : an "About you" block to fill in, a loop to customize when you want to add "Asides" post style, some CSS to tweak to use an personal image in header, etc…

The problem is : most bloggers are not PHP or HTML expert, can't tell the difference between an HTML tag and a PHP tag, and simple editing of templates can be hazardous and tedious to them. Adding an admin menu in your theme ensures that end users can customize things without editing source files, just as naturally as changing a WordPress option in the admin area.

WordPress Theme Toolkit is a PHP class that gives WordPress theme authors the opportunity of creating a persistent admin menu for their theme as easily as editing 3 lines in a file.

You are a theme author ? Have enough skills to edit three lines ? Add an admin menu to your theme ! (click to enlarge)
Theme Toolkit : admin menu example

Just to be sure : WordPress Theme Toolkit is not a theme with an admin menu. It is something that makes adding an admin menu to an existing theme as easy as 1-2-3.

This long article is divided in shorter sections :

  1. Intro : well, here.
  2. Overview : a quick tour about features and how easy things are.
  3. Manual : detailed features and how-to
  4. Download ! : files and credits.
  5. Ideas and Examples : suggestions and ideas of what you could add to your theme … and a real WordPress Theme as an example of use.
Page: #1 #2 #3 #4 #5

Shorter URL

Want to share or tweet this page? Please use this short URL: http://ozh.in/ko

Metastuff

This page "WordPress Theme Toolkit" was posted on 03/09/2005 at 2:36 pm
Watch this discussion : Comments RSS 2.0.

196 Blablas

  1. DavidX66 says:

    Wow ! Ozh roulaize ! ;)

  2. […] planetOzh planet ozh has released a tool that could be a revolutionary way of approaching theme creation. Not having had a chance to play with it yet, it seems like the opportunities are endless..now scurries off to install… […]

  3. […] WordPress Theme Toolkit es obra de Ozh, quien en su propio blog nos ofrece todos los detalles del invento. Y algo que a muchos les va a gustar: ha creado una plantilla, Minimalissimplistic, con la herramienta ya implementada para que todo aquel que quiera pueda ir probando la herramienta. Te dejo la dirección de descarga de la plantilla. […]

  4. BillSaysThis says:

    While useful and innovative I wonder how the toolkit will affect performance. Seems likely to add a number of if() tests, function calls and database lookups judging by the examples on page five of this article.

  5. Ozh says:

    Bill, the themetoolkit itself won't affect performance at all. It's just a class definition with no additionnal database lookup. Everything stored by a theme is stored in a single entry in the option table, where options are all read by WordPress at once at the beginning of a page load. Having one more option for a theme is a matter of a few nanoseconds, something like this :)

    Now, the functions you can write to make use of the themetoolkit can affect performance. You can write something that queries SQL a lot, etc… But again, in the examples of page 5, there are absolutely no additionnal query. Yes, there are if() tests, but errr dude … ever looked at the source of anything PHP ? :) This is uberbasic code I've put as an example here, and testing variables is nothing. When looking at performance, you don't even look at a one liner comparing two variables man :)

  6. […] You can check out this WordPress theme toolkit here. […]

  7. […] WordPress Theme Toolkit […]

  8. fuzzit says:

    I installed the minimalisticsimple theme and when I go into the dashboard/themes nothing pops up, but the themes name. I click on edit the theme and it shows nothing in the files. When I view them in a text editor they are there. I changed the permissions because I thought that was the problem but that didn't work either.
    Please help

  9. Ozh says:

    Sorry I don't understand what your problem is. Install the theme, select it, *load your blog* (ie read a post), and that's it.

  10. Nate says:

    So is there something like this that would allow you to edit several themes at the same time? That is what I have been tyring to look for.

  11. Ozh says:

    I don't understand what you mean, so I guess the answer is "no"

  12. tonetripper says:

    So your instructions on how to install these tools are about as clear as mud. I keep referring back to where these are suppose to be uploaded to my ftp and to what folder and it is very unclear where I put them. Is it in the "themes" folder in the "wp-content" folder or is there some other folder I should be searching for in the blogging folder on my site that is somewhere else. You refer to putting these .php files into a "theme" folder. Please clarify.

    Sincerely frustrated.

    "WordPress Theme Toolkit is just a set of 2 PHP files you will drop into your 'THEME' directory (see Page 4 for download links)" – Where is this directory?

  13. Ozh says:

    From the doc here :
    Say we are working on a theme named, how original, “My Neat Theme”, which would sit in wp-content/themes/mytheme.
    Step 1
    Put the required files functions.php and themetoolkit.php in your theme directory.

    For the frustrated no-clue "clear as mud" kind users such as toneripper, this means you put the 2 files in wp-content/themes/YOURTHEME. Which is a theme directory.

    I just cannot be clearer than this. If it's still unclear to you, move along, this means you're lacking the basic skills required to work with WP themes.

  14. shane says:

    This is quite amazing! The power and flexibility of Themekit should really be included right in the core of WP! Works perfectly wonderful on a stand-alone install of WP. Now we'd like to use this on a WPMU install now that MU allows plugins in each of the user blogs.

    Once installed and "activated" as usual, it returns a "Fatal error: cannot redeclare xxxxx() (previously declared in….) and points to the line number of the function xxxxx().

    I found a similar error with WP plugins running under PHP 5.x but Themekit works fine with PHP 5.x, just not with WPMU.

    Any ideas?

  15. […] Options are managed from an admin panel (using WordPress Theme Toolkit) which gives the theme a lot of functionalities and customization possibilities. […]

  16. […] Stumbled upon WordPress Theme Toolkit today, and it seems really cool to add to the theme. […]

  17. […] Additionally, it has an admin menu (uses WordPress Theme Toolkit) where you can set various options. […]

  18. […] (Possibly) Incorporate Theme Toolkit for customization. […]

  19. Steve says:

    I was wondering how to get WordPress Theme Toolkit to allow localization. I mean in the way the WP Theme and plugin does.
    I'm developping a new them and as always i wish make it fully internationalized, but using WordPress Theme Toolkit i can't localize the strings into settings of functions.php o at least i'm doing it worng, using __ and _e function doesn't work

    Any suggestion ?

  20. […] Usamos WordPress Theme Toolkit […]

  21. Steve says:

    A goo improvment would be if we can have another type of of optin that generate a header title allowing to divede vaious options in subsections

  22. Steve says:

    Looks like the WPToolKit had problem with WP 2.0. I'm still investigating to sort out what it's the exact problem.

  23. Ozh says:

    Steve, I'm aware of the problem : it's currently incompatible with WP2.0
    I'm working on it, will be fixed at least for 2.0 stable (but probably in the next few days)

  24. Steve says:

    Good to know… what about my other wustions about a new option and about localization? :) (I know I'm a pain in the ass sometimes ;) )

  25. Ozh says:

    Yeah, localization is a very good suggestion… I never think about it because I'm never using it, so I'll have to investigate to understand how localization works in WP. But that's definitely a good idea :)

  26. Steve says:

    I tested to see if putting localization functions in your code works.. but with no luck.

    Even worste is the text put into function.php variable by the theme developper.

    Ryan Boren it's the one that implmented most of the internationalization functions, but documentation on the codex it's very incomplete.

  27. […] Usamos WordPress Theme Toolkit […]

  28. […] Will definitely have to check this out… […]

  29. HTNet says:

    Fun With WordPress Theme Toolkit

    I came across WordPress Theme Toolkit while developing my current theme; Tuned… and I thought, what the heck, I might as well give it a whirl.
    I'd like to share one of the things I use the toolkit for: Automatically Generating Feeds Links…

  30. […] I recently found out about Ozh's Theme Toolkit, so thought I would give it a go with a theme I am messing with. Essentially it allows you to add features that are them administered through a page within the WordPress back-end. […]

  31. […] A new version of the WordPress Theme Toolkit hits the road, compatible with the upcoming WordPress 2.0 (and downwards compatible with existing installations). Theme authors and users are advised to upgrade. Technorati Tags: wordpress wordpress plugin wordpress theme   […]

  32. […] Dopo un primo lavoro di programmazione che risultava incompatibile con la nuova WP 2.0 ho optato per l'utilizzo dell'ottimo WordPress Theme Toolkit che permette di realizzare facilmente interfacce per il pannello di amministrazione per i propri temi e di fornire una struttura per ospitare tutte le funzioni necessarie all'interno del tema. Da pochi giorni l'autore ha rilasciato la versione compatibile 2.0/1.5.x così da poter sviluppare un tema adatto ad entrambe le piattaforme. […]

  33. […] WordPress Theme Toolkit « planetOzh (tags: blog design webdev wordpress plugins) […]

  34. […] Themes using WordPress Theme Toolkit (http://planetozh.com/blog//my-projects/wordpress-theme-toolkit-admin-menu/) (a plugin for themes). Ozh is working on the issue, may be fixed soon, will be fixed anyway for WP 2.0 final. […]

  35. Marina says:

    Wow, what a cool tool! I am going to try it for my themes, thanks so much for sharing!

  36. Josie says:

    Your instructions are poorly written up :(

  37. This is great but the style mangles TinyMCE (only partly visible) on the comments pages -any ideas?

  38. Ozh says:

    Josie » you're welcome.

    Dennis » I don't understand what your problem is. I see nothing wrong in the admin theme area. Can you make a screenshot with OS / browser infos ?

  39. shamsulazhar says:

    Hi Ozh,

    Fantastic tool with excellent documentations.

    I'm currently upgrading my tiga theme to use this toolkit.

    One small problem that I notice is with the checkboxes. Checking it is OK, but to uncheck the user needs to do it twice.

    BTW, thanks for sharing this great tool.

  40. Ozh says:

    shamsulazhar » in fact, it's a browser's cache problem. Thanks for feedback :)

  41. […] New site layout and photo gallery –> By chad I've finally fixed the layout of the site (I hope) for at least the next few weeks. I was having a hard time inding a template that was compatible with FAlbum and had enough layout structure. Many thanks to shamsul and his theme Tiga. I was able to site down the PHP files and figure out how to customize the look to my needs. Now I'm working on integrating all the options into his already great use of Ozh's WordPress Theme Toolkit. Again, it's all about control for me. […]

  42. […] You didn't do anything wrong. This is a bug in the WordPress Theme Toolkit I use to power the Tigarator. It occurs when you use the theme on a fresh install without any plugins activated. The simple workaround is to activate any plugin such as the 'Helllo Dolly' plugin and it should work fine. Hey Shamsul, I'm thankful for your work. You're such a nice and helpful guy. Can I buy you lunch? […]

  43. hadi farnoud says:

    i was installed Fauna theme,but i haven't any option! i should install anything???,please help!

  44. james says:

    Hi Ozh,

    I use the fauna theme which utilises your theme toolkit and after asking Joen the author he felt you may be able to answer my question best.

    I have moved my site over to TextDrive hosting and they use the mod_security system to stop comment spam and bad referers, etc. Unfortunately the '../' in the Current Theme Options also triggers this and I get a 412 Precondition Fail error. This is the URL:

    http://mapofthedead.co.uk/weblog/wp-admin/themes.php?page=../themes/fauna/functions.php

    One of the admins over at TextDrive has confirmed that it is definitely the '../' in the URL that is triggering the error. Is there any other way to use the theme options with a different URL?

    Many thanks for your help.

  45. james says:

    Hi Again,

    I'm not comment spamming, honest!

    I was able to solve the issue by editing the '..' out of the URL in the themetoolkit.php file and everything works fine now.

  46. […] New options With a bugfix to the great themetoolkit by Ozh, I have added more options. Now you can flip the sidebar to the right with two clicks. You can also hide meta info, links, or show the calendar or categories on the homepage. […]

  47. alvin says:

    Hi, I just want to say this script you've written is going to have a lot of impact on the 'theming community' in wordpress. It's purely l33t!

    Upon trying out your script, i quickly noticed a shortcoming – giving user the power to upload their own header image from that theme option and change the header image after upload is done. I tried hacking the codes but so far it has been fruitless as it does involve hacking your themetoolkit.php here and there to make the browse input form works.

    I know the other solution would be to just put an input box and let user enter the absolute path of the images they uploaded into somewhere else and replace the css background-image properties for that header div tag. But that might seem like a long journey for an average Joe.

    Maybe you can shed some lights here.

    Again GJ!

  48. Ozh says:

    Alvin » thanks for feedback :) Indeed, you're right about the lack of uploading features. I started to code this themetoolkit when WP 1.5 was around, and it had an Upload form, so such a feature was useless in the toolkit. I'll have to think a bit about this, but at first glance I see more problems and configuration option hassles than benefits. BTW, nice site you have, are you releasing a theme any time ?

  49. Rudd-O says:

    Man, I integrated your admin menu in my theme, and it works like a charm, except for this:

    When I input a valid URL in an option in the options screen for my theme, with %amps; (the percent sign should be replaced by an ampersand sign) instead of plain ampersands,

    the %amps get replaced by plain ampersands like this: http://www.top100bloggers.com/index.php?do=votes&id=1262

    Basically, any entity I enter is subsequently displayed as the character it's supposed to be portraying. The code works alright, since %amps; are getting saved to the database, but the admin screen shows them as plain ampersands.

    Where can I contact you directly?

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.