WordPress Learning Series 2: Templates and directory structure

Source: Internet
Author: User

Usually a WP theme must have files that are:

404.php archive.php
attachment.php author.php
footer.php category.php
functions.php comments.php
header.php page.php
index.php search.php
single.php sidebar.php
Style.css tag.php

There is no longer a description of each file function, it is believed to be at a glance.

Next we start editing style.css, which usually starts with some copyright tags:

/* Theme Name:mini themetheme uri:http://example.com/example/description:a search engine optimized website framework F or WordPress. Author:your Nameauthor uri:http://example.com/version:1.0tags:comma-separated tags that describe Your theme.
...
*/

To complete a home page, we need to involve 3 files: header.php/index.php/footer.php, calling header.php and footer.php in index.php, need to use:

1 <?php get_header ();?>//Import head
2//index.php middle section
3 <?php get_footer ();?>//import Trailer

WordPress Learning Series 2: Templates and directory structure

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: info-contact@alibabacloud.com 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.