After upgrading to WordPress 6.1, you can view the source code and find a style code in the header:<style id='classic theme styles inline css' type='text/css
The default WordPress allows administrators to view comments in the background and even contributors, which is really unreasonable.If you only want the administrator to have permission to view the comments in the background, you can add the following code to the current topic function template functions.php
WeAvatar is currently the most complete avatar service in China, which perfectly replaces Gravatar avatar and solves the pain point that has plagued domestic WordPress users for many years. At present, WeAvatar avatar service is used on this site.Add your own special avatar
Enabling Redis object caching can significantly reduce database queries.For example, the Redis Object Cache, a common WordPress object cache plug-in, needs to install the Redis extension for PHP before enabling the plug-in.Take the commonly used pagoda panel as an example: software store
This function is normally used to output the number of article comments:<?php echo get_comments_number(); ?> With judgment, we can achieve what we want: if (get_comments_numbe
WordPress will automatically use the current time as the timestamp when uploading media files. If you want to customize this timestamp, you can add the following code to the current theme function template functions.php: function zm_custom_upl
The Autooptimize plug-in is used to optimize the compression of CSS, JS, etc. to make the website load faster.The optimized compressed web page source code becomes crowded, which is not conducive to viewing.To view the original source code temporarily, just add the following after the web page address of the source code you are viewing:?ao_n...
The website log analysis software in the pagoda software store is generally charged. Here we recommend a very useful free website access log analysis tool 360 star map, which can effectively identify web vulnerability attacks, CC attacks, malicious crawler scanning, abnormal access and other behaviors.One click automatic analysis, output safety points
For example, if some content of the website only wants to be seen by the viewer, rather than being crawled by the search crawler, the page content can be dynamically loaded through Ajax instead of being displayed directly in HTML, and the hidden content can not be seen in the page source code, the search crawler will not normally recognize the content loaded by Ajax, and naturally there is nothing
If you need to call WordPress articles within a certain period of time, you can do so through the following code.<?php $cat = '2'; // Category ID//Get the subcategory to exclude the subcategory article $args=array (
WordPress's built-in feature image function is used to generate thumbnails, but by default, WordPress does not provide us with the feature image function to view an article. You can use the following code to display the feature image of an article in the background article list.Will replace
Sometimes it is necessary to display the current subcategory link on the WordPress classification archive page. You can use the following codes: $args=array ('child_of '=>get_query_var ('cat'), 'hid
Every time a menu item is added, there will be one more database query, so it is necessary to cache the menu.Here we recommend a menu caching plug-in, Menu Caching, which can be used together with other static caching plug-ins or used separately.Usage: After enabling the plug-in, enter W
As for how to apply Honeypot technology, here is a plug-in Honeypot for WP Comment for your reference.Of course, there are many similar plug-ins, and only a simple one is recommended here.