Once you install and activate the Magplus theme then your AMP pagination won’t be working and once you click on the pagination it will redirected to Non-AMP version and to fix it, you need to add below code in the theme’s functions.php file and once you add this code then your pagination will work properly.
// Detect AMP
add_action('wp', 'check_is_amp');
function check_is_amp(){
if ( ! function_exists('is_amp')) {
function is_amp(){
return function_exists('ampforwp_is_amp_endpoint');
}
}
}That’s it for this tutorial!!
We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.