[wp-hackers] A theme that adds Pages on install

Alan J Castonguay alan at verselogic.net
Sun Jun 22 15:14:22 GMT 2008


Alex,

> I am interested in the opinion of people on this list as to whether  
> they
> see any problem in a theme adding Pages to the database when it is
> activated(if that is possible, I haven't yet looked), considering  
> that the
> theme will not be used for a conventional blog, and in effect 'needs'
> these pages.

A theme is just a visually-oriented plugin, and can do anything that  
a 'normal' plugin can do, including wp_insert_post()'ing Pages. The  
theme's functions.php file is loaded in wp-settings.php, just after  
the plugins, but before the init hook, for every page load. I think  
that the switch_theme action is processed before the theme's  
functions.php is ever loaded, though.

> Another question I have is whether it is 'right' to sell a theme if it
> requires free plugins to use all of the theme's potential features?

Certainly, consider it work for hire. There may be restrictions (GPL  
compatible?) on the licenses under which you can distribute it, but  
that has no bearing on what you charge for initial development.  
Compare: is it right to sell a theme if it requires (free) Wordpress  
to use the theme at all?

-Alan


More information about the wp-hackers mailing list