views:

231

answers:

1

Wordpress themes are beautiful!

Is there any guideline to use Wordpress themes in a rails app? Even better, are there rails app templates which can use the Wordpress themes already?

Thanks!

+2  A: 

WordPress themes consist CSS, images, and templates that are mix of HTML and PHP (with the PHP invoked WordPress APIs). There's nothing for Rails that I know of that will deal directly with WordPress templates.

However, reusing CSS and images from WordPress with HTML that you generate from Rails instead of from WordPress is quite straightforward. If it's hard to tell what HTML will be generated from the .php bits, load the theme up in a scratch copy of WordPress, and view the source of the generated pages to see the generated structure. Then generate the same in Rails. That's about it (after you adjust paths for the .css and image locations).

One issue worth noting is giving credit for the theme. It's customary in WordPress to leave credits in the footer. It'd be good form to leave these in when you convert a theme to Rails.

Dave W. Smith