Proper way to include PHP files in Wordpress theme -


i trying develop wordpress theme requires lot of php functions , custom classes.

i wondering best practice including additional php files within worpdress. example: list every file include using:

  • include();
  • require_once()
  • etc

when review other developers themes, never stumble across batch of "include() statements, believe must missing standard method of performing these includes.

thanks in advance :)

you can follow method. suggest use require include file.

_s ( aka underscores ) theme starter kit , default themes of wordpress such twentyfourteen, twentythirteen, etc using require include files.

see sample code used in tweentyfourteen theme.

require get_template_directory() . '/inc/template-tags.php'; 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -