load_template ( $_template_file, $load_once = true, $args = array() )

  • (string) _template_file Path to template file.
  • (bool) load_once Whether to require_once or require. Default true.
  • (array) args Optional. Additional arguments passed to the template. Default empty array.
Defined at:
Change Log:
  • 5: .


Requires the template file with WordPress environment.The globals are set up for the template file to ensure that the WordPress environment is available from within the function. The query variables are also available.

Related Functions

locate_template, get_template, locate_block_template, get_paged_template, get_block_template

Top Google Results

User discussions

wpseek mobile