There is no hint about the size of the image when uploading the featured image edited by WordPress articles. If the theme is developed for your own use, it will have no impact. But if it is a custom theme, it will obviously affect the size selection of the thumbnail when the customer uploads it, thus affecting the display effect of the front page of the website.Therefore, when developing WordPress applications that use featured images, you can effectively avoid some details by adding a hint of image size to the location where featured images are uploaded.The code for adding prompts is relatively simple
WordPress 5.5 started with its own XML site map, but many WordPress users used plug-ins or third-party tools to generate the site map XML file, and did not intend to replace it with the wp-sitemap.xml provided by WordPress, so that the XML site map provided by WordPress would become redundant,You can also choose to disable WordPress wp-sitemap.xml.Blog Bar currently knows that there are two ways to disable WordPress wp-sitemap.xml, one of which is
After WordPress 5.9 is updated, a large block of style inline style code with the ID of global styles inline css will be added to the source code of the front page (see its ID means global inline style). This inline style should serve the site editor function added in WordPress 5.9, but for webmasters who do not use this function,It seems redundant. Although it does not affect the normal operation of the website, it is believed that many users will not be able to bear such a large piece of useless code, so deleting it will be a choice for many users.Delete Method
Since the beginning of WordPress 5.8, the gadget management mode in the background appearance has also used the Gutenberg editor's block editing mode, which is very powerful, but I am not really used to using it, and the original classic gadget is more friendly for users with little demand for gadget editing function,The WordPress official also considered this problem, so it released the classic gadget WordPress plug-in classic widgets. Enabling this plug-in can restore the classic WordPress gadget device interface in the past.(More...)
Wordpress can get the article title through the_title() function, but it can't find the wordpress function that can directly get the article alias. So if you want to call the article alias, you can only write the calling function. The code is relatively simple.(More...)
Wordpress calls the functions previous_post_link()Next_post_link() calls plain text hyperlinks. How can I call the featured images of the previous and next articles?The idea is to obtain the ID of the previous article and the next article, and then pass it to the function get_the_post_thumbnail() to obtain the thumbnail to call the corresponding characteristic image.(More...)
Get the number of articles published by Wordpress today, that is, get the number of articles published during the period from 0:00 to 24:00. Bloggers have shared the code of the number of articles published on the day WordPress calls. The implementation method is through the WP_Query class. The code shared today is counted by using the $wpdb object query quantity database.(More...)
For the development needs of the website, the top articles of the website are called separately outside the main loop on the home page. Since you don't want to see two lists of the same top articles on the home page, you should exclude the top articles before the latest articles in the main loop.Blog Bar has previously shared the tutorial "Exclude top articles from the latest Wordpress article list", which uses query_posts() to exclude top articles. However, using query_posts() can easily cause pagination problems in the article list, so it is not recommended. The following code is recommended.(More...)
You can modify the display text of the top level menu on the left side of the background by modifying the display name tutorial code of the "Article" in the background management menu through Wordpress, but when you enter the article management interface, the button or link text on the page still uses "Article". To modify these text, you need to continue to add the following code.(More...)
The name of the WordPress background management menu on the left is fixed. No top-level menu or submenu provides relevant setting options for users to modify freely, but the corresponding function hook admin_menu is provided. Therefore, to modify the display text of the background management menu, you can install the WordPress plug-in or add function code. The following is to modify the background "article"The function code for managing menu names can be used as a reference to modify other menu names.(More...)
The wordpress website has created multiple classified directories. By default, all classified directory articles are allowed to be viewed by all visitors. How can I achieve this if I want to let non logged in visitors only access specified classified articles?WordPress does not provide this function in the background by default, but it needs to be implemented through code or plug-ins.The code shared below implements wordpress to restrict visitors from accessing specified classified articles.(More...)
In the upper right corner of WordPress background management interface, there is a "Help" option for each management. For users who are already familiar with WordPress, it has no effect. To clean the interface, you can remove it through code.(More...)
The title title of the wordpress background login interface http://domain name/wp login. php has the suffix "-- wordpress". If you do not want to display this suffix or want to change it to another title, you can use the following code to implement it.(More...)