I don’t really know what the criteria would be.
I tend to include all the functions I think of as integral to my theme, with my theme
But I tend to organize the functions in different files then include them in my functions.php
Not sure if that’s really the best way to do it….it just keeps my functions file from getting huge
Things like sidebars, custom post types, taxonomy, etc I code directly into functions.php
Then I do things like custom comments callback, or a large block of code to add an admin theme options menu in separate files with names to help my memory, like comment-callback.php and theme-options.php
and in my functions.php just include them
require_once ( get_stylesheet_directory() . '/theme-options.php' );
etc…
but basically, if I was going to let someone use my theme, and I consider the functionality to be something that is needed in the theme, I include it in the theme rather than in a plugin
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Some (most!) of the plugins are quite complicated and supporting them in a theme directly gets tedious.
If you want the options/functionality/feature to be available in your theme, then you might want to use function.php. That way the features stay with your theme and the users do not need to download addtional files.
If you want to recommend that your theme users use those plugins but leave it up to them, then in your readme.txt file you can place pointers to those plugins and just add if..then support in your theme files for those plugins.
Thanks to both of you. I have my theme planned just as both of you put it. Especially using separate files to store large code blocks and calling those files from the functions.php file. Very clear.
Thanks again