WordPress theme to Drupal theme

universalwings - June 23, 2009 - 00:11

I've primarily designed themes for WordPress. Any good documentation pieces on converting a WordPress theme into a Drupal theme?

Just read up on how theme-ing

tjkoblentz - June 23, 2009 - 00:27

Just read up on how theme-ing in Drupal functions (.tpl.php files, .css files), it's very similar to how Wordpress works. Just create your markup in your template files in the same way the markup is on your Wordpress template type files and they should come out the same when using identical selectors in your stylesheets.

TJ

.

Keyz - June 23, 2009 - 00:44

You can go one of several routes. You can either convert your existing HTML/CSS to have Drupal functionality (leaving your existing HTML and CSS intact, but replacing all of the dynamic PHP elements with those from Drupal), or you can make use of one of the many Drupal starter themes and adapt it to look the way the WordPress theme did (e.g. taking a raw Drupal-specific theme framework, then adding your existing CSS into it, making some HTML changes, adapting some things as necessary). Both ways have benefits or drawbacks... the first method will likely be pretty fast though you'll end up needing to locate and add in some styling to handle Drupal specific elements such as the admin area and secondary tabs, and you'll have to touch the PHP a bit more (not hard stuff, mostly copy and paste). The second method guarantees everything Drupal specific will work pretty well right off and you don't have to touch the PHP much, but you'll have to adapt more of your CSS to work with it (not bad with use of Firebug). If it's your own WordPress theme and you plan to maintain it for both WP and Drupal, the first method is very likely better since you'll have code that is more similar/familiar and thus easier for you to maintain.

You may also find this recent discussion helpful http://drupal.org/node/486744 (here's my comment).
Also I wrote a comment the other day as I was looking at WP themes to convert to Drupal, noting similarities in their level of complexity.

Hope this helps... oh and welcome to Drupal :)

 
 

Drupal is a registered trademark of Dries Buytaert.