WordPress theme or plug-in application development often requires uploading function of media files such as pictures, videos, documents, etc. If developers write media upload components independently, they need to spend a lot of time and effort. However, by calling the media library components provided with WordPress, they can achieve twice the result with half the effort. Only simple js code can be written to have a powerful media upload function.Wp.media code parameter var mediaObj=wp.media ({frame: 'select',//Select the media type to call the media library. You can select, post, image, audio, video, and select s
This is a practical WordPress theme with simple two column structure layout and classic blog design style. There is no gorgeous design, complex structure and dazzling effect. Some are classic top design, classic navigation style and classic graphic blog list. It focuses on one simple and comfortable, one exquisite and compact, easy to use, suitable for batch site buildingSEO optimization or novice Xiaobai beginner experience a theme of WordPress.The theme adopts standard front-end code development and production, with a red versatile style, and the maximum width of the main body is 1440 pixels..
The mzastart theme is a WordPress theme designed and developed for the We Media blog website. The current theme of BlogBar is modified on the basis of this theme.The theme uses a responsive structure with a two column layout, standard front-end HTML+CSS+JQUERY code, and is compatible with current mainstream PC and mobile browsers such as IE10+, Firefox, Chrome, Safari, etc. The overall design of the theme is exquisite, simple, and beautiful, which can be accessed by both PC and mobile phones..
This is a WordPress theme suitable for building information blog websites. It adopts simple white design, classic two column layout, and graphic typesetting. The overall design is responsive and adaptive. It is compatible with mainstream PC and mobile browsers such as IE10+, Firefox, Chrome, Safari, whether on mobile phones, tablets, or PCsComputer side access has excellent browsing experience, and both informative blog sites and CMS blog sites are good choices.The theme style is simple, but the display module..
Z-Blog uses the {template: pagebar} to call the page turning bar, which uses the ‹, ‹, ›, ›› symbols to represent the first page, the previous page, the next page, and the last page respectively. What if you don't want to use symbols to directly display Chinese?You can try to use the flip bar source code to modify or modify global variables, and the method is simple.Operation method: 1. Edit the include.php file of the current theme, find the ActivePlugin_ theme ID function, and add the following code $zbp ->lang ['msg '] ['first_button']='home page'; $zbp->lang['...
When developing a zblog theme, the page turning bar of the article list page is habitually called with {template: pagebar}. This tag is used to call the pagebar.php template under the theme template directory. If the template does not exist for the theme used, the default pagebar.php template will be called. If you want to customize the page turning HTML slightlyCode, you can extract the code and put it on your own topic.Operating steps: 1. Create a php file named pagebar.php in the template/directory of the current theme, and add the following code to it..
A WordPress theme for personal We Media blog, blog blog, geek blog type websites, with a responsive two column structure, delicate white elegant design, reasonable layout, standard and standard code, supports SEO basic settings, and meets the requirements of search engine optimization.The overall theme is clean and comfortable, simple to use and easy to configure. If you are a webmaster who likes the white simple style WordPress theme, this WordPress theme mzalog will be a good choice.The theme feature code is carefully optimized..
After WordPress is updated to version 6.1,WordPress will automatically generate and reference a classic-themes.min.css style file with the ID of classic-theme-styles-css in the front end head. The file contains a style code of the class selector.wp-block-button__link, which seems to act on Gutenberg blocks. If you feel you can't use it or feel it is inconvenient, you can use wp_enqueue_scriptsHook deletion.The generated calling code is as follows: Delete classic theme
It takes a long time to polish the design and elaborate the development of a set of atmospheric zblog themes. The theme of zbstudio is positioned as a design studio, IT information software company or network marketing company to build a website zblog theme.The overall theme design is suitable for displaying works, products, cases, announcements and information;Studios and companies that collect the needs of interested customers for consultation can meet the needs of most companies or studios for building websites.The theme fully considered the display needs of the studio company's website, and the design has large rotating pictures and companies..
PHP obtains the element of a key value in the array, which is a common requirement in Z-Blog theme and plug-in application development, and the implementation code is relatively simple.However, Z-Blog also has a built-in function GetValueInArray() to obtain the element of the specified key value from the array. Using the built-in function, isset judgment can be omitted. At the same time, it internally encapsulates the judgment of whether the required key value exists. If it does not exist, the specified parameter will be returned.Function structure GetValueInArray ($array, $name, $default=null) Parameter description $array - array name, $name - subscript k is required
When developing zblog themes or plug-in applications, you need to obtain all images or the first image in the article content or other HTML code, usually through regular matching.However, since the zblog 1.7 version, the program has closed the GetImagesFromHtml() function, which obtains all images from HTML. With this function, you don't need to write regular matches by yourself anymore. You can call it directly by passing parameters.The function GetImagesFromHtml ($html) is used to obtain all pictures from HTML;Parameter $html - string, HTML code or related variable return value returns a value with HTML
In PHP, the value of GET, POST, or COOKIE methods is usually obtained by using the $_REQUEST, $_GET, $_POST, or $_COOKIE variables, and isset() is generally required to determine whether the variables are declared, which is a little troublesome.The function GetVars(), which encapsulates the HTTP Request method of PHP in Z-Log, simplifies the code and can quickly obtain the passed value without isset() judgment. When the variable does not exist, null is returned by default. It also provides optional parameters for the default return value, which is relatively convenient and easy to use. GetVa...
In the development of zblog topics or plug-in applications, it is inevitable that there will be a need to add new database tables. Adding new tables manually in the database will have little impact on self use applications, but it is not friendly for charging applications for many users. Therefore, it is necessary to automatically create corresponding database tables through code at the time of application startup.The following is a tutorial of Zblog php on user-defined database tables, which is transferred from the Z-Blog official library Wiki and uses the favorite article function as an example. It introduces table creation, addition, deletion, modification and query in more detail.Tip: This tutorial code only verifies the MySQL database, and the rest needs to be verified by yourself.Tutorial of Creating Tables Declare and Define Data Table Structure function