load_template [ WordPress Function ]
load_template ( $_template_file, $require_once = true )
| Parameters: |
|
| Defined at: |
|
Soorgelijke functies: locate_template, get_template, get_paged_template, is_page_template, get_tag_template
Require 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.
Source
<?php
function load_template( $_template_file, $require_once = true ) {
global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
if ( is_array( $wp_query->query_vars ) )
extract( $wp_query->query_vars, EXTR_SKIP );
if ( $require_once )
require_once( $_template_file );
else
require( $_template_file );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/load template « WordPress Codex
Description. Require once the template file with WordPress environment. The globals are set up for the template file to ensure that the WordPress environment is ...
codex.wordpress.org - WordPress › Support » Hook load_template or locate_template
6 days ago ... Hook load_template or locate_template (1 post). Steveorevo Member Posted 12 hours ago #. This would excellent. Child development of ...
wordpress.org - load_template - PHP
www.php.net - RESOLVED: Mod help (load_template ... - Invision Modding
Hello, I'm working on a mod and it seems I'm not doing something right. I've modified all the appropriate files (to my knowledge) accordingly.
invisionmodding.com