: This article mainly introduces the WordPress topic creation tutorial [1]-Learn about WP & Structure & indexing. For more information about PHP tutorials, see. I have recently started the development of WordPress topics. First, we will understand what is WP and its structure in this chapter. Index this article to the WP series of tutorials that will be written later.
(Sorry, don't worry. keep updating ....)
1. First, let's get to know what wordpress is and what it can be used?
WordPress is a blog platform developed in PHP. you can build your own website on servers that support PHP and MySQL databases. WordPress can also be used as a content management system (CMS.
WordPress is a personal blog system and gradually evolved into a content management system software. it is developed using PHP and MySQL databases. You can use your blog on servers that support PHP and MySQL databases.
WordPress has many free templates developed by third parties, which are easy to install. However, to create your own template, you must have some professional knowledge. For example, you must understand at least the HTML code, CSS, PHP, and other related knowledge of an application under the standard general markup language.
WordPress supports the Chinese version and third-party Chinese language packs developed by enthusiasts. WordPress has thousands of plug-ins and countless theme template styles.
2. status quo and prospects of Wordpress
You can learn from Baidu that the WordPress platform has become the basic platform for 18.9% websites worldwide, with more than 0.1 billion websites.
This is a huge number and is very competitive.
I don't need to say much about the future. it's already very good, and there will be more people.
2. Advantages and disadvantages of Wordpress
Wordpress can win the favor of so many users, so it must be very good? Let's list it.
Advantages:
There are a large number of themes and plug-ins that you can easily expand.
You can easily expand the features you want. you can transform WP into CMS, SHOP, enterprise site, and classification information.
The system is deployed with hooks to facilitate development.
The system installation package is relatively small, only 6.9 MB.
The system version has a low degree of fragmentation. you can focus on the development of the latest version without worrying about compatibility with the old version.
You can easily find a lot of website construction and usage skills about WP.
Disadvantages:
The system only has 12 tables. These 12 tables can be expanded with many functions, but the efficiency is also reduced.
It is not suitable for building large data traffic websites (well optimized)
Fewer system functions (this should be a key factor for success)
AD: dredging Movie Network
//////////////////////////////////////// /////////////////////////
Template file and definition
Header. php page header template *
Footer. php footer template *
Index. php homepage template *
Single. php article page template *
Page. php page template *
404. php 404 error page template *
Search. php search result Template *
Archive. php file *
Archives. php
Author. php author Template
Category. php category directory Template
Comments. php comment Template *
Comments-popup.php
Image. php image attachment Template
Links. php
Sidebar. php sidebar template
Functions. php template function *
Style.css style sheet *
Rtl.css style sheet (RTL )*
Screenshot.png thumbnail *
-Images Image folder
-Js script folder
-Fonts font folder
-Widgets gadgets folder
-Page-templates page template folder
//////////////////////////////////////// /////////////////////////
Page and article template creation
/*
Template Name: two-column Template
*/
?>
// Copy the above code to the top of the template, and place the template on page-templates for unified management.
//////////////////////////////////////// /////////////////////////
Register and create widgets
1. First, you need to create a reference for the gadgets in functions. php.
Require_once get_stylesheet_directory (). '/widgets/widget-index.php ';
-Widgets gadgets folder
-- Widget-index.php gadgets index file (this will take care of registration of all gadgets)
-- Widget-tools1.php specific gadgets
-- Widget-tools2.php ......
2. create the widget's file name widget in the array-{here is the file name in array}. php
$ Widgets = array (
'Tools1 ',
'Tools2'
);
3. create at the top of the widget
Function widget_ui_tools1 (){
$ Widget_ops = array ('classname' => 'widget _ ui_tools1 ', 'description' => 'Show test 1 content ');
$ This-> WP_Widget (true, 'dg-Test 1-title', $ widget_ops );
}
For more information about gadgets, see Register gadgets and create [widgets].
//////////////////////////////////////// ////////////////////////////
1. you need to create your theme folder under the/wp-content/Themes/folder.
2. you need to create index.php?screenshot.jpg=style.css
3.you need to write the following topic information at the top of the style.css file:
4. go to the WP topic list and you will see the demo you created.
/*
Theme Name: DNNGO One Theme
Description: This is a test theme.
Theme URI: https://www.dnngo.net/
Author: zhangzaiman
Author URI: https://www.dnngo.net/
Version: 1.0
*/
//////////////////////////////////////// ////////////////////////////
You can add the created static HTML to index. php and split the shared page header and footer.
Put the page header and footer code in the header. php and footer. php files respectively.
Replace the two functions in the header and footer of the following page (same as the include function)
// Load the header template header. php
// Load the footer template footer. php
AD: dredging Movie Network
Copyright disclaimer: Reprinted with the source URL
The above introduces the WordPress theme production tutorial [1]-Learn about WP & Structure & index, including some content, and hope to help those who are interested in the PHP Tutorial.