2023/12/12

How to disable 1536 and 2048 size pictures generated by WordPress

When uploading large size images, WordPress will automatically generate 1536x1536 and 2048x2048 image sizes. This is WordPress version 5.3, which is introduced to support responsive design and high-resolution display devices. The relevant code is in/wp includes/media. php. We don't need this

  • code
  • 2023/12/12
  • two hundred and sixty-one
  • 2023/12/6

    In WordPress articles, only administrator visible content can be achieved through special tag settings

    Some contents in WordPress articles only want to be visible to the logged in administrator (himself). To implement this function, you can edit the functions.php file in the theme folder, and add the following code function admin-only-content($atts, $content = null) { //Check whether the current user is a pipe

  • code
  • 2023/12/6
  • two hundred and seventy-nine
  • 2019/3/16

    Disable WordPress auto saving article drafts and revisions - Gutenberg editor

    The WordPress auto save function will save the article draft regularly during editing. By default, WordPress saves the draft every 60 seconds. You can change or disable this interval directly through code, but after WordPress launched Gutenberg's new editor, the disabled articles provided online are automatically saved

  • code
  • 2019/3/16
  • 1,338
  • 2019/3/10

    TCPA - Unilateral Congestion Algorithm (similar to BBR and Sharp Speed) used internally by Tencent, TCP acceleration makes websites faster

    The TCP unilateral congestion algorithm, Google BBR, is currently in huge use. Some partners have even developed BBR Violent Edition, BBR Violent Modification, BBR Plus Edition, and so on. At present, many people use Sharp Speed, but it is not recommended. BBR Plus has the best effect among BBR versions. Tencent Core Group

  • code
  • 2019/3/10
  • 3,120
  • 2019/3/6

    DD install Windows system on Linux system

    Generally, VPS vendors only provide Linux distribution versions of CentOS/Debian/Ubuntu and other systems. There are few VPS vendors that can provide Windows systems. Even if they do, they need to pay extra. Windows itself is not free to use, and it is only recommended to install Lin when running on a small memory (512M) machine

  • code
  • 2019/3/6
  • 8,335
  • 2018/12/31

    Use MySQL Event to set a scheduled task to execute SQL statements

    If you want to regularly execute an SQL statement command at a specific time every day to backup or update and delete the database, you can directly use the scheduled task Event event provided with MySQL to perform the operation. It should be noted that the Event event is newly added in MySQL 5.1. Another point is to ensure that

  • code
  • 2018/12/31
  • 4,057
  • 2018/12/15

    The WP Super Cache cache plug-in reported an error after the WordPress server moved

    After the server migration is completed, open the website and find that the cache prompt of the WP Super Cache plug-in reports an error. At this time, enter the WordPress management background to refresh twice and it will disappear. This is because the WP Super Cache cache plug-in will automatically modify the server path address in the wp-config.php file under the blog root directory

  • code
  • 2018/12/15
  • 1,242
  • 2018/11/4

    VS Code Modify the color after selecting the same text or code

    The mouse cursor of Visual Studio Code (VS Code) editor is placed in the code. Is the same code very difficult to see? It is relatively easy to see with less code, but it is not easy to see with more code. Fortunately, VS Code has a better choice besides changing the theme, that is, straight

  • code
  • 2018/11/4
  • 11,543
  • 2018/10/25

    Disable automatic clipping of WordPress thumbnails and uploaded pictures

    WordPress uploads thumbnails, featured images, and images, which are automatically cut into multiple small size images in proportion to adapt to the image display on different devices. Most of the WordPress themes used now are adaptive themes. This function is basically useless, and there are disadvantages that occupy space

  • code
  • 2018/10/25
  • 3,183
  • 2017/8/29

    Introduction to the differences among px, em and rem in css units

    Px px pixels are relative to the display screen resolution. You cannot adjust the size of fonts, buttons, etc. that use it as a unit when the browser zooms the page. The value of em is not fixed. It inherits the font size of the parent element and represents a multiple. If the font size is not set by its parent, then

  • code
  • 2017/8/29
  • six hundred and thirty-five
  • 2017/4/22

    WEB front-end development HTML+CSS+JavaScript self-study video tutorial download collection

    Are you ready to join the team of web front-end development? Or is this plan under consideration? As a new profession, web front-end development is very popular, and the positions in this field are also vacant. It is not as difficult as programming language, and does not consider logic thinking ability, nor English ability

  • code
  • 2017/4/22
  • 2,474
  • 2016/7/14

    CSS changes the color of any PNG format image

    🔺 1、 Seeing is believing CSS can modify the color of PNG transparent images, as shown in the figure below The code is as follows <! DOCTYPE html> <html lang="zh-CN"> <head>     <meta charset="UTF-8"> <title>CSS changes the color of any PNG format picture&

  • code
  • 2016/7/14
  • 9,423