The wp theme is easy to set and manage. The WordPress background theme setting panel can be independently developed. The wp theme can set the webmaster's website conveniently and quickly. You can modify the theme customization options as you like even if you don't understand the code. Automatic SEO optimization: wp topics pay great attention to search engine optimization in the development process, and with the help of WP platform's SEO advantages, you can automatically extract and generate page keywords and descriptions without any plug-ins.
The cutting-edge design style of the wp theme. The wp theme always pays attention to the cutting-edge design style and keeps up with the industry trend, whether responsive or flat, WordPress Theme It can be easily solved. With technical support and long-term free use, the wp theme can get long-term free use right. Wp theme has 15 different pre built websites, which can be arranged and managed according to different types. The webmaster can freely combine any component in these pre built websites.
The unlimited footer layout of the wp theme, plus more than four blog layout combinations, more than four works display layout combinations, two works display single layout, and three product page layouts. The wp theme supports retina, is compatible with WooCommerce, and is optimized through its own wp theme performance, plus WPML multilingual plug-ins. You can let the webmaster 360 ° website picture layout, and then customize the product label.
Before decomposing the code in detail, we still need to understand the general situation of the wp topic. A wp theme is composed of several templates files. Each theme must have two files: index.php and style.css (style sheet). In addition, there are some other files (not required). They have a priority relationship with the index.php file. If they exist, the wp theme system will call them to display the corresponding page, Otherwise, the template system will call index.php to display.
The header information of each topic of the wp topic is almost the same. You can view the header. php file of the default template. To ensure the consistency of the header information of all pages, all the header information is placed in the header. php file. The content in the wp topic body. It consists of four parts, each of which can be called an integration module. In fact, a theme is composed of different modules, and modules are composed of different modules. The top of the header WP displays the name and description of the blog, places the navigation bar, search bar, and so on. The body of content WP displays the content, author, time, classification, comments, editing, etc. of the post.
Sidebar section of sidebar WP. At the end of footer WP, there is little content, usually copyright information. In theory, the content in each integration module can be placed at will. For example, we can put the search bar in the wp topic in the sidebar module. How does the wp topic distinguish these four integration modules? Look at the following codes:
《div id="header">
The webmaster's own blog site
《/div>
《div id="content">
This is my blog</div>
《div id="sidebar">
Search bar, category, archive, friendship link
《/div>
《div id="footer">
Now let's start with the code block in the first part of the wp topic. However, before writing the code, the code should have a sense of hierarchy. Remember to indent it, instead of indenting it with spaces, use the TAB key.
《div id="header">
《h1><a href="<?php bloginfo(url);?>"><?php bloginfo(name);?></a></h1>
《?php bloginfo(description);?>
《/div>
ID is an attribute of a div. Assign different values to the ID, so that each div code segment can be distinguished.
Bloginfo () is a function defined in the wp theme. The parameter url returns the URL, the parameter name returns the name of the website, and the parameter description returns the description of the website.
In the code above the wp topic, you add a hyperlink to the blog title and display the description.
If we save the above three lines of code with the header as a new file - header. php. In this way, we can import them through the wp theme function.