Hello @iamratneshrs
Your site will always be served as non-AMP for desktop users, If you have chosen the setting to redirect mobile users to AMP pages it will redirect mobile visitors to the AMP page. You can disable it from the setting to prevent that.
I hope this helps!
No, I mean if Desktop users type: https://www.networkherald.com/?amp on Chrome PC URL, they’ll get to the AMP version, which I don’t want especially for Desktop users. Please guide
Hi @iamratneshrs,
Just for curiosity, are your Desktop users going to the AMP version or do you just want to avoid it?
There is a solution but It could be affected by the cache plugin, make sure to test in a staging environment first and clear the cache when the code is applied as plugin or in a functions.php from your theme:
add_action( 'template_redirect', static function () {
if (
function_exists( 'amp_is_request' )
&&
amp_is_request()
&&
! wp_is_mobile()
&&
wp_safe_redirect( amp_remove_paired_endpoint( amp_get_current_url() ) )
) {
exit;
}
} );
@iamratneshrs
As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.