[ Index ] |
WordPress Cross Reference |
[Source view] [Print] [Project Stats]
Template loading functions.
File Size: | 445 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
get_query_template( $type, $templates = array() X-Ref |
Retrieve path to a template Used to quickly retrieve the path of a template without including the file extension. It will also check the parent theme, if the file exists, with the use of {@link locate_template()}. Allows for more generic template location without the use of the other get_*_template() functions. param: string $type Filename without extension. param: array $templates An optional list of template candidates return: string Full path to file. |
get_index_template() X-Ref |
Retrieve path of index template in current or parent template. return: string |
get_404_template() X-Ref |
Retrieve path of 404 template in current or parent template. return: string |
get_archive_template() X-Ref |
Retrieve path of archive template in current or parent template. return: string |
get_post_type_archive_template() X-Ref |
Retrieve path of post type archive template in current or parent template. return: string |
get_author_template() X-Ref |
Retrieve path of author template in current or parent template. return: string |
get_category_template() X-Ref |
Retrieve path of category template in current or parent template. Works by first retrieving the current slug, for example 'category-default.php', and then trying category ID, for example 'category-1.php', and will finally fall back to category.php template, if those files don't exist. return: string |
get_tag_template() X-Ref |
Retrieve path of tag template in current or parent template. Works by first retrieving the current tag name, for example 'tag-wordpress.php', and then trying tag ID, for example 'tag-1.php', and will finally fall back to tag.php template, if those files don't exist. return: string |
get_taxonomy_template() X-Ref |
Retrieve path of taxonomy template in current or parent template. Retrieves the taxonomy and term, if term is available. The template is prepended with 'taxonomy-' and followed by both the taxonomy string and the taxonomy string followed by a dash and then followed by the term. The taxonomy and term template is checked and used first, if it exists. Second, just the taxonomy template is checked, and then finally, taxonomy.php template is used. If none of the files exist, then it will fall back on to index.php. return: string |
get_date_template() X-Ref |
Retrieve path of date template in current or parent template. return: string |
get_home_template() X-Ref |
Retrieve path of home template in current or parent template. This is the template used for the page containing the blog posts. Attempts to locate 'home.php' first before falling back to 'index.php'. return: string |
get_front_page_template() X-Ref |
Retrieve path of front-page template in current or parent template. Looks for 'front-page.php'. return: string |
get_page_template() X-Ref |
Retrieve path of page template in current or parent template. Will first look for the specifically assigned page template. Then will search for 'page-{slug}.php', followed by 'page-{id}.php', and finally 'page.php'. return: string |
get_paged_template() X-Ref |
Retrieve path of paged template in current or parent template. return: string |
get_search_template() X-Ref |
Retrieve path of search template in current or parent template. return: string |
get_single_template() X-Ref |
Retrieve path of single template in current or parent template. return: string |
get_attachment_template() X-Ref |
Retrieve path of attachment template in current or parent template. The attachment path first checks if the first part of the mime type exists. The second check is for the second part of the mime type. The last check is for both types separated by an underscore. If neither are found then the file 'attachment.php' is checked and returned. Some examples for the 'text/plain' mime type are 'text.php', 'plain.php', and finally 'text_plain.php'. return: string |
get_comments_popup_template() X-Ref |
Retrieve path of comment popup template in current or parent template. Checks for comment popup template in current template, if it exists or in the parent template. return: string |
locate_template($template_names, $load = false, $require_once = true ) X-Ref |
Retrieve the name of the highest priority template file that exists. Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which inherit from a parent theme can just overload one file. param: string|array $template_names Template file(s) to search for, in order. param: bool $load If true the template file will be loaded if it is found. param: bool $require_once Whether to require_once or require. Default true. Has no effect if $load is false. return: string The template filename if one is located. |
load_template( $_template_file, $require_once = true ) X-Ref |
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. param: string $_template_file Path to template file. param: bool $require_once Whether to require_once or require. Default true. |
Generated: Tue Mar 25 01:41:18 2014 | WordPress honlapkészítés: online1.hu |