Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to support google AMP in WordPress

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to support google AMP in WordPress? in view of this question, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

1. About AMP

In the era of mobile Internet, although website responsive design can satisfy multi-screen browsing (pc, mobile phone, ipad, etc.), google launched a faster mobile page access technology-Accelerated Mobile Pages (AMP accelerated Mobile Page) in October 2015. AMP page greatly simplifies mobile pages and aims to improve the access speed for mobile pages. The characteristics of AMP are as follows:

The HTML code of AMP is a subset of the standard HTML, which greatly simplifies the code of html, and part of the Html code will no longer be applicable, such as table, frame and so on.

Css is greatly simplified and can only be written in HTML, not external CSS files.

Most of the functions of JS are not available, but many of the interactive functions are gone, although it affects the rich interaction, but increases the speed.

Strengthen the control of page resources, such as pictures, videos and other users drop down to the picture and then load.

Taking full advantage of caching, Google caches AMP pages on its own server.

For more information about AMP, refer to the following link:

AMP official website: https://www.ampproject.org

Roadmap for AMP: https://amp.dev/community/roadmap/?referrer=ampproject.org

When AMP was launched, it was limited to news pages, and in August 2016, google announced that AMP would be applied to all types of mobile pages. At present, although google makes it clear that AMP pages will not affect the ranking, but google spares no effort to promote AMP, it is difficult to guarantee that AMP will not be taken into account in the algorithm in the future.

two。 Let WordPress support AMP

AMP is very suitable for news, blogs and other information websites. As an old blog system WordPress launched the official plug-in of AMP on October 6, 2016. at present, this plug-in greatly simplifies the article page. The article AMP page removes the navigation and messages, leaving only the article content itself. this page is also compatible with browsing on the desktop computer (pc) at the same time, and there is no corresponding AMP page for home page, classification, page flipping, etc. I expect that more features will be added in the subsequent version, and if you don't want to wait, you can also directly modify this plug-in to add navigation, classification and other functions.

After installing the AMP plug-in that starts WordpPress, the plug-in creates an AMP article page where the link URL adds "/ amp" to the link URL of the original page. Take the link to this blog article as an example:

Link to the original article page: / / www.watch-life.net/wordpress/wordpress-google-amp.html ‎

Link to the AMP page: / / www.watch-life.net/wordpress/wordpress-google-amp.html/amp

In order for google's search engine to retrieve the AMP page, you need to specify the address of the AMP page in the HTML of the original article page, that is, use the amphtml tag to indicate the address of the AMP version:

In the HTML code of the AMP page, you should also use the canonical tag to indicate the address of the original article page:

The AMP page is displayed on the PC

Display of AMP page on mobile phone

Display of 3.AMP pages in google search

After the AMP page is indexed by the google search, you see the AMP page in the search results, with a lightning mark and the word AMP at the front of the description. After the user clicks, the page opens quickly, showing the cached page on the Google server. In the google search, the AMP page is shown as follows:

4. Will Baidu follow up on AMP?

The domestic webmaster is most concerned about whether Baidu (baidu) search will follow AMP? The good news is that Baidu also supports similar AMP. The bad news is that Baidu launched its own set of similar AMP-Mobile Instant Pages (MIP Mobile Web Accelerator) in August 2016. AMP and MIP are very similar, no matter HTML, CSS, disable most JS, resource control, cache, etc., are almost similar to AMP, and the mutual reference method (tagging) between the original page and MIP page is the same as Google AMP. The page layout of the official website, menu arrangements, technical notes in the content is almost surprised to be consistent, to see Baidu's MIP is basically copied AMP. So why doesn't Baidu use AMP like google? And AMP is open source. I think an important reason is that the JS library used by AMP needs to call the official website to control resource loading, caching and other functions:

This is probably one of the core reasons why Baidu is reluctant to adopt AMP. In view of the domestic network environment (the great qiang), it is inevitable that people worry that the js library was blocked that day. At present, there is no WordPress plug-in for MIP. If you use MIP for WordPress, you can only rely on the method of changing the theme template. The most troublesome thing about this method is that you need to enable a second-level domain name for the MIP page separately. I do not intend to follow up. I think this method is not as simple and fast as plug-ins.

This is the answer to the question about how to support google AMP in WordPress. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report