After wordpress is upgraded to version 4.2, emoji is added. The facial expression is remotely loaded using the following CDN:
Http://s.w.org/images/core/emoji/7210872/
The problem is that the CDN is slow to access in China, and cannot be accessed in most cases.
If you know the reason, you can solve the problem. Zhiwen studio provides two ideas to solve this problem, which are for reference only.
Solution 1: Change the accessible CDN
After a static resource such as an image is downloaded once, the browser caches the image and loads it again before it expires.
There are a large number of wordpress sites. When users access these sites, they only need to load them once from CDN. The benefits are Needless to say.
The following CDN addresses provided by maxcdn are accessible:
Http://twemoji.maxcdn.com/7210872/
The following CDN provided by bootcss can also be accessed:
Http://cdn.bootcss.com/twemoji/1.4.1/7210872/
Solution 2: use the station expression
If an emoticon image is on your site, it will not be accessible from external addresses. Emoji is shared by the twitter team for free. You can download it from github:
Https://github.com/twitter/twemoji/releases
Download and decompress the directory, and then copy and upload the 72 × 72 directory to your site. Put it in the following path:
/Images/emoji/72 × 72/
Change the emoji Request address
Select a new access path based on any of the above solutions, and then follow these steps.
1. Log on to the background and select "appearance-edit ".
2. Select "template function (functions. php)" on the right side to edit functions. php.
3. What is at the end of the file?> Add the following code before, note that the address should refer to the solution you selected:
// Change the emoji CDN address
Function lzwme_emoji_baseurl ($ url ){
Return set_url_scheme ('// cdn.bootcss.com/twemoji/1.4.1/72x72 /');
// Return set_url_scheme ('// twemoji.maxcdn.com/72x72 /');
// Return set_url_scheme ('/images/emoji/72x72 /');
}
Add_filter ('Emoji _ url', 'lzwme _ emoji_baseurl ');