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

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -