Wordpress adds ad configuration function to classification
Wp_terms Add admaster field varchar 200
wp-admin/edit-tag-form.php
Open Phoenix News to view more HD pictures
Small information:
wordpress
The three forms of wp_terms classification table wp_term_taxonomy classification type table and wp_term_relationships classification association table are interrelated
Wordpress optimization efficiency
When the execution efficiency of wordpress is too slow, consider SQL optimization
The execution mechanism of wordpress is to query the top articles, and execute a very time-consuming sql statement in the original topic and most topics
SELECT wp_posts. * FROM wp_posts WHERE ID IN (tens of thousands of article IDs)
Wordpress has no mechanism to eliminate the time of top articles, so when you have hundreds of thousands of articles, there will be thousands of top articles,
Select in tens of thousands of IDs Imagine how long this SQL needs to be executed
It is tested that the execution time of select in for tens of thousands of IDs is 16 seconds, that is, 16 seconds. This method is a public method. It is called in many places, so this sql is very common
The sticky_posts of the top article under option_name in the wp options table. The data is stored serially
In wp-includes/option.php
Get_option//method
Wordpress has a mechanism called revision record, which is absolutely good from the perspective of editing, but for developers, it needs to deal with the generation of big data,
On average, each article will have about ten revisions, which means that the data volume will increase ten times. The wp posts table has the guid field, which records
The original address is used, but there is a problem in this place, that is, it is not indexed. In WordPress, many users will query the guid when they need to query data,
Without an index, a large number of slow SQL logs will be generated. The solution is simple: add an index to it, that is, the NORMAL common index btree index method
Wordpress can open the web page in the browser to view the suffix of the imported css when the style.css modification cannot take effect immediately. The suffix needs to be updated. For the time being, I use
The laziest method is to find functions.php or functions_xxx.php in the template folder selected by wp content/themes/
define( THEME_VERSION , 7.1 );
Change the version number at will to make the css style take effect immediately
Supplementary information
Most wordpress development is in the template folder The template folder is in the wp content/themes/template folder
Index.php homepage
Page.php page
Single.php Content Page
Category. php category page
Header.php header
Footer.php bottom
Style.css control global style (foreground)
Sidebar.php The content of sidebar gadgets will be mostly here
Search.php Search Page
Tag. php tag page
Functions. php public methods He will reference various public methods
Comments.php comments
Author. php Author Page