To Make desktop site Amp as well

Posted in: Newspaper
Post count: 24

Hello dear team, I wanted to make my website completely AMP version , i want Amp version on mobile, tablet and desktop as well, can you tell me how can we make it possible?
Kind Regards.

Post count: 21065

Hello!

The AMP only works better with the Mobile Theme plugin. From my point of view, if you don’t use the Mobile Theme plugin, then there is no reason or benefit to AMP. Please read all about AMP here: https://forum.tagdiv.com/tagdiv-amp-plugin-tutorial/
To have the layout also on desktop(which I do not recommend it), you’ll need a cache plugin which does not feature options for a separate mobile theme plugin.
The Mobile Theme is a performance optimized theme included in the Newspaper main theme and it loads only for mobile devices. It comes with its own templates/design for page, post, category, etc so your current templates from the desktop theme will get converted to the mobile theme layout. For more details, please take a look here: https://forum.tagdiv.com/the-mobile-theme/ and https://forum.tagdiv.com/mobile-theme-introduction/

Thank you!

Post count: 24

Thank you Bettina for answering, i know you are right in your explanation but if still i want to implement it on desktop site as well then how can i do that? I want complete amp version on all devices (for experiment).
Kind Regards.

Post count: 21065

Hello!

Force AMP on desktop: Add the following code to the theme’s functions.php file to force AMP on desktop:

add_filter( 'amp_skip_canonical', '__return_true' );
add_filter( 'amp_is_request', function() { return true; } );

This will disable the canonical link for AMP pages and force AMP on all requests, including desktop requests.

Thank you!

Post count: 24

I have implemented code in function.php but it is not working.
Can you please explain how will it work?

Post count: 21065

Hello!

Try to implement this with the help of a child theme. Check this guide: https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thank you!

Post count: 24

Hello Dear i have created the child theme and also put the code but when i open website on desktop it is still the desktop version, Can you please check and confirm.
https://ibb.co/1f8cCLB

Post count: 21065

Hello!

You can contact our custom work team here: https://tagdiv.com/premium-customization-services/ and they can help you.

Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.