Simplified WordPress template Code help manual Chinese edition

Source: Internet
Author: User
Tags wordpress blog wordpress version

If you are learning how to create a Wordpress topic, it will be very useful.

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

PHP code in the 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 ('name');?> WordPress blog name
<? Php bloginfo ('html _ type');?> HTML version of the website
<? Php bloginfo ('charset');?> Website character encoding format

PHP code of 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"
<? 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

Other Wordpress template code

/% Postname %/display the custom permanent link of the blog
<? Php the_search_query ();?> Search form value
<? Php _ e ('message');?> Print Output Information
<? Php wp_register ();?> Show registration Link
<? Php wp_loginout ();?> Show logon/logout links
<! -Next page-> insert pages in logs or pages
<! -More-> log Truncation
<? Php wp_meta ();?> Displays administrator-related control information
<? Php timer_stop (1);?> Display the page loading time
<? Php echo get_num_queries ();?> Display load page Query


Reproduced from the simplified Wordpress template Code help manual Chinese Version | Palan Image

Contact Us

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: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.