👋🏼Welcome to my WP-Host blog where I am excited to share my knowledge and expertise on WordPress hosting and website construction tutorials with you. Let’s connect and learn from each other! You can reach me at info@yrshare.com.
I’d like to continue sharing about WordPress plugins. Although most of the WordPress theme templates we use already have complete functionality, everyone has different requirements. Therefore, in most cases, we make some modifications to the original theme template, which are usually done in the theme’s functions.php file. This is where we can modify the theme or plugin effects, or even disable certain functions, which is very convenient. However, the only issue is that these modifications will be overwritten when the theme updates.
Today【WP-Host/悦然wordpress建站】recommend a plug-in that can replace the theme functions. After updating or modifying, it will not affect the effect of our previously modified code.
This wordpress plugin is Code Snippets, you can search and install it directly in the wordpress background plugin center, or you can download it through the link.
The download address is as follows:
Code Snippets
https://wordpress.org/plugins/code-snippets/
Enable directly after installation.
After enabling, we add a new code snippet, and then add the function code you need, as shown in the figure above. In this way, as long as the plugin exists, even if you update or change the theme template, this code effect will always exist.
Note: Although this plug-in is easy to use and convenient, we still try to use it as little as possible under normal circumstances. Plug-ins always have some impact on the website, and they are only used when they are necessary.
Well, for ordinary enterprise website construction users, there may not be many code modifications involved. If you want to modify, please be careful, and it is best to consult relevant technical personnel.
Practical code snippets to share
The following are some more practical code snippets I compiled, you can use them directly, add them to the Code Snippets plug-in and activate it to take effect.