WordPress template basic file
Style.css style sheet file
Index. php homepage file
Single. php log single page File
Page. php page File
Archvie. php classification and date archiving page files
Searchform. php search form files
Search. php search page files
Comments. php message region file (including message list and message box)
404. php 404 error page
Header. php webpage header file
Sidebar. php webpage sidebar file
Footer. php webpage bottom file
Loop has been used in a new batch of theme templates. php files, such as loop-single.php is the article page template, mainly to the article framework and the article display part of each other, in fact there is no new development, changing.
WordPress Header
Note: The PHP code between
<? Php bloginfo ('name');?> Website title
<? Php wp_title ();?> Log or page title
<? Php bloginfo ('stylesheet _ url');?> The relative address of style.css in the wordpresstheme sample table file
<? Php bloginfo ('pingback _ url');?> Pingback address of WordPress blog
<? Php bloginfo ('Template _ url');?> Relative address of the WordPress topic file
<? Php bloginfo ('version');?> Wordpress version of the blog
<? Php bloginfo ('Atom _ url');?> The Atom address of the WordPress blog
<? Php bloginfo ('rss2 _ url');?> WordPress blog RSS2 address
<? Php bloginfo ('URL');?> Absolute WordPress blog address
<? Php bloginfo ('Description');?> WordPress blog description
<? Php bloginfo ('HTML _ type');?> HTML version of the website
<? Php bloginfo ('charset');?> Website character encoding format
WordPress subject template
<? Php the_content ();?> Log content
<? Php if (have_posts ():?> Check whether logs exist.
<? Php while (have_posts (): the_post ();?> If yes, all logs are displayed.
<? Php endwhile;?> End the PHP function "while"
<? Php endif;?> End the PHP function "if"
<? Php get_header ();?> Header. Php file content
<? Php get_sidebar ();?> Content of the sidebar. Php file
<? Php get_footer ();?> Contents of the footer. Php file
<? Php the_time ('M-d-y')?> Display date in the format of "02-19-08 & Prime;"
<? Php comments_popup_link () ;?> Display the message link of a log
<? Php the_title ();?> Displays the title of a log or page
<? Php the_permalink ()?> Display the permanent link/URL address of a log or page
<? Php the_category (',')?> Display the category of a log or page
<? Php the_author ();?> Show the author of a log or page
<? Php the_ID ();?> Display the ID of a log or page
<? Php edit_post_link ();?> Display the editing link of a log or page
<? Php get_links_list ();?> Show links in Blogroll
<? Php comments_template ();?> Comments. Php file content
<? Php wp_list_pages ();?> Display a blog page List
<? Php wp_list_cats ();?> Display a blog category list
<? Php next_post_link ('% link')?> URL of the next log
<? Php previus_post_link ('% link')?> URL of the previous log
<? Php get_calendar ();?> Call calendar
<? Php wp_get_archives ()?> Display the date archiving list of a blog
<? Php posts_nav_link ();?> Display newer log links (previous page) and older log links (next page)
<? Php bloginfo ('Description');?> Display the blog description
Wordpress judgment statement
Is_single () determines whether it is a page for a specific article
Is_single ('2') determines whether it is a page of a specific article (id = 2)
Is_single ('beef stew') determines whether it is a page for a specific article (subject)
Is_single ('beef-stew') determines whether it is a page for a specific article (slug)
Whether to enable comments_open ()
Pings_open () whether to enable ping
Whether is_page () is a page
Is_page ('42') id judgment, that is, whether it is a page with id 42
Is_page ('About Me') determines the title
Is_category ('6') id judgment, that is, whether it is a classification with id 6
Is_category ('chees') category title judgment
In_category ('5') determines whether the current article belongs to Category 5
Is_author ('20140901'): Display the author number 1337 page
Is_author ('elite hacker') displays the current author's page by nickname
Is_author ('elite-hacker') the following uses different judgments to display archives in years, months, days, and times.
Is_date ()
Is_year ()
Is_month ()
Is_day ()
Is_time ()
Is_archive () determines whether the current page is an archive page
Is_search () determines whether it is a search
Is_404 determine whether the page is 404