For including functional (as opposed to template) files in a Theme, you should use something like the following in functions.php:<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>include_once( get_template_directory() . '/relative/path/to/file.php' );</div></blockquote><div><br></div><div>Unless the file is intended to be over-ridden in a Child Theme, in which case you would use:</div>
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>include_once( get_stylesheet_directory() . '/relative/path/to/file.php' );</div></blockquote>
<div><br></div><div>I'm sure Plugins would be similar, but that's a question outside the scope of Theme-Reviewers. :)</div><div><br></div><div>Chip<br><br><div class="gmail_quote">On Wed, Aug 24, 2011 at 1:39 PM, Ryan Frankel <span dir="ltr"><<a href="mailto:ryan.frankel@gmail.com">ryan.frankel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">All,<br>
<br>
I have a dumb question that I am sure has been covered a million times but I am not sure what the best way to include PHP files into my plugin/theme. What I currently have is something like below which can't possibly be the right way to do it.<br>
<br>
include_once(WP_PLUGIN_DIR . '/swamped-event-calendar/php/functions_db.php');<br>
include_once(WP_PLUGIN_DIR . '/swamped-event-calendar/php/functions_calendar.php');<br>
include_once(WP_PLUGIN_DIR . '/swamped-event-calendar/php/functions_list.php');<br>
<br>
Any tips on this would be greatly appreciated.<br>
<br>
Ryan<br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</blockquote></div><br></div>