As a webmaster who has wandered on the Internet for many years, he has also published a lot of online articles on his WordPress website, and now self-media is everywhere, and sometimes some articles he writes may be copied casually. Although the Internet is driven by openness, sharing, and freedom, some people can use the following methods to tell users to keep the original information when reposting articles. The following methods have passed the test and can be used with confidence.
The first:
The following methods are available for testing in WordPress, and other PHP-based methods can be tested and used by yourself. You can add the following code directly to your current functions.php file.
1 |
// Tips for copying articles |
The JS and CSS invoked above are public resources. If you feel that the loading is slow or affects the speed of the website, you can download the file to the local server separately, specify the path and modify the corresponding source code.
The second type:
The second type has no beautification, no CSS style, and can be used directly.
1 |
// Tips for copying articles |
You can also beautify and adjust the style of the prompt box according to your own needs, so no further description will be made here.
After the copyright content copy prompt code is changed, in order to see the effect immediately, it is recommended that you open an incognito window in the browser or press F5 to check the effect.