This article is mainly to record the content of wordpress theme. As for the reasons why you should write your own WordPress theme, I believe everyone has their own experience. Want to make your blog more prominent? More personal words? The writing of WordPress themes is one of the reasons why WordPress is so popular. Because there are at least hundreds of thousands of people writing professional themes online. This means it provides hundreds of thousands of employment opportunities. There is also a big man who has gained millions of assets (every year) by writing professional WordPress themes, which can be said to be a huge gain. So we must write a good wordpress theme.
So what knowledge is needed to write a WordPress theme? First of all, you need to have a better web interface, which of course needs to be designed using a design tool (such as PS). So it would be great if you have an artist, and this artist at least understands the current website development trends and what is the most popular now (gradients in CSS3, transparency, etc.). Then it is converted to html, and then converted from html to theme.
The theme should contain the following content:
widgets support.
Widgets are some widgets (add-on) in wp, which are generally used in sidebar or footer. Such as calendar, etc.
Comment and quote support. As for the reason, I won’t go into details, I believe everyone knows it. The design of the application is very necessary. Can be more beautiful.
There is also support for avatars. This is very interesting. You can upload it in gavatar. You mainly need to register through email, then you can upload it, and then get it through get_avatar($email, "80") in wp (you can get it in widget or plugin ).
Custom Post types support. This newbie thinks this function is one of the most important functions in WordPress to become a CMS. It can make your interface more flexible when used in CMS, not only in blogs, but also make your website more personalized. It can be said that with Custom post types, it can support the design of all website structures (developed using wp).
header.php-----------The header file is called with get_header(). If you use hook, it is also add_action("wp_head","yourFunctionName" );
single.php---------- The page of a single blog.
search.php----------Search.
sidebar.php----------Use get_sidebar() to call.
footer.php-----------get_footer() call, of course you can use widget to add content
page.php------------Single page, used to distinguish post.php
index.php----------A page with a lower level. If the above file does not exist, call it. For details, please join codex wordpress
image.php-----------image;
functions.php----------Function.
author-bio.php------------Author introduction
archive.php---------- Archive.
comments.php----------Comments.
content.php----------Content.
content-search.php----------Content retrieval.
content-page.php-----------Content page
content-none------------No content
content-link---------- Content link.
404-link---------- 404.
........................
The last part is the function of blog options
You can change the color tone, logo, favicon, etc. of your blog.