Read about wordpress page template hierarchy, The latest news, videos, and discussion topics about wordpress page template hierarchy from alibabacloud.com
WordPress is currently the world's most widely used blog system, is an open source of PHP software. Because the user is numerous, so the WordPress community is very active, has the rich plug-in template resources. Use WordPress can quickly build independent blog site. Many well-known science and technology blog is also
don't have a permanent link enabled, you need to edit the page URL by following these steps: Create a new page by writing a > page . Click the Publish button when the page content is complete. Open the admin > Page . Click on the edit next to the
Wordpressid is a simple method for obtaining the page ID of the template used in WordPress. WordPress provides a simple method to obtain the page ID of the template used. what is wordpressid? By default,
A simple way to get the page ID of the template used in WordPress, Wordpressid
What is a template? By default WordPress is using the theme directory page.php to display the page as a template
What is a template? By default, WordPress uses the page under the topic directory. php is used to display pages as templates, but sometimes we need different templates to display pages, such as logon, registration, and contribution pages. These pages are different from common pages, at this time, WordPress provides a
What is a template? By default WordPress is using the theme directory page.php to display the page as a template, but sometimes we need different templates to display pages, such as login, registration and submission page, and so on, these pages and ordinary pages are differ
, minute, or second.
Any archive pageIs_archive ()Whether to archive the page.
A search result page
Is_search ()Whether to search pages.
A 404 Not found page not found page
Is_404 ()Whether the page is 404.
A paged pageIs_paged ()Determine whether there is a
Brief introduction WordPress templates are combined to generate the pages of your website. Some templates, such as headers and footers, are public to all pages, and some are used only in some specific pages/situations. This article is about: This article answers the following questions: What template file is called when WordPress generates a specific
first Page introduces the current theme root directory of the footer-home.php file else Get_footer ();//If it is not the first page or 404 pages introduce the current theme root directory of the footer.php file
Other
This function is located at: wp-includes/general-template.php
Articles you may be interested in:
Explain the PHP functions used to get Comment templates and search forms in
ArticleDirectory
A complete set of WordPress templates should have at least the following files:
A complete set of WordPress basic template files should have at least the following files:
Style.css: CSS (style sheet) File
Index. php: homepage Template
Archive. php: Archive/Category
, just in the_content (); below ).
Copy codeThe Code is as follows:If (function_exists ('subpage _ nav_link ')){If ($ subpage_nav_link = subpage_nav_link ()){Echo $ subpage_nav_link [0]; // link of the previous Article (page)Echo $ subpage_nav_link [1]; // next (PAGE) Link}}?>
NOTE: if (! $ Subpage_nav_link [0]) to determine whether there is any previous article. Similarly, if (! $ Subpage_nav_link [1]) to
WordPress Basic Template fileA complete set of WordPress templates should have at least the following files:Style.css:CSS (style sheet) fileindex.php: Home TemplatesArchive.php:archive/category templates404.php:not Found Error page templatecomments.php: Message/reply templateFooter.php:Footer templatesHeader.php:Header
themes. Of course, modifying these themes is inseparable from some of the basic code and functions I mentioned above. Therefore, Yi Hengan specially searched for some basic code and functions that are frequently encountered in WordPress theme template files, share this with you.WordPress topic-basic template file
A complete set of
This article describes how to obtain the header template and the bottom template in the WordPress topic writing, including the use of the get_header () and get_footer () functions. For more information, see
Get_header () (obtain the header)Introduce the header template of the topic. by default, the header. php file in
1, the origin of the template
In the absence of template technology, the use of PHP development programs, usually PHP code and HTML mixed together. For example, a news list, which is probably a newslist.php page, is structured as follows:
read out the news record to be displayed from the database
?>
........
while ($news = Mysql_fetch_array ($result)) {
?
For more information, see WordPress. For more information, see The PHP function for WordPress to call comment templates and to output comments cyclically. For more information, see the wordpresscomments_templatecomments_template function, which is a function for calling comment templates, for more information about how to use WordPress, call the comment
Looking at template-laoder.php, this file is only 45 lines in total. Its role is to load the correct template based on the URL of the access.The sixth line of the file is also the first statement, as follows:if defined (' Wp_use_themes ') wp_use_themes) do_action (' Template_redirect ');First judge whether to use themes, the Wp_use_themes constant is set to true in the first sentence of index.php. As a
Yesterday the use of the Firefox firebug plug-in share, we see the trust will use. Today, we'll create a template for the theme.When we just started to install the WordPress system to enable a theme, the default home page is displayed in the list of articles, that is, the form of the blog, then it first call is the theme inside index.php this file. While we are l
the call code in the loop of page. php (if you don't know it, just in the_content (); below).If (function_exists ('subpage _ nav_link ')){If ($ subpage_nav_link = subpage_nav_link ()){Echo $ subpage_nav_link [0]; // link of the previous article (page)Echo $ subpage_nav_link [1]; // Next (page) link }}?>Note: if (! $ Subpage_nav_link [0]) to determine
Template File(Template files) AndTemplate(Template) Is the second tutorial in the WordPress topic series from scratch. Before you start, make sure you have read the WordPress theme tutorial #1: Introduction. Otherwise, you will not be able to understand the terms used in tut
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.