This may or may not be relevant and it doesn’t answer the technical question. When you create an AMP page you are effectively asking google to cache that page in the SERPS. Google is not going to cache two pages which are effectively the same thing. In other words google is not going to support your A/B testing.
Hello @fathimasavas
Can you please send me the Exact URL where you are facing the issue of the homepage is not redirect to the amp so I can check it and will solve it for you as quickly as possible.
Hi,
My website includes 5 languages(US,UK,SV,NL,DE). I have setup custom homepage. It is working fine for US but not for all other 4 languages.It showing blog posts on all other languages. Don’t know how to set up 5 language homepages in amp settings. Can you please help in this?
These are the links
US – https://www.eazystock.com/amp/
UK – https://www.eazystock.com/uk/amp/
SV – https://www.eazystock.com/sv/amp/
NL – https://www.eazystock.com/nl/amp/
DE – https://www.eazystock.com/de/amp/
Thanks,
Fathima
Hi @fathimasavas,
Can you tell me which plugin are you using for translation?
Until then try using this code. Add it to your themes functions.php
add_filter('ampforwp_modify_frontpage_id', 'ampforwp_es_frontpage_id');
function ampforwp_es_frontpage_id($id) {
$id = get_option('page_on_front');
return $id;
}
Let us know if that helps or not.
Hi Marqas,
Thanks for your reply. I am using polylang plugin for translation. And I have pasted your code in my theme functions.php. But still not working. It showing blog post only for all other 4 languages except US. Also when I switch language, it redirects to normal page, but not to AMP page.
Thanks,
@fathimasavas,
Have you enabled the Custom FrontPage support from AMP options Panel?
Yes, I have enabled and specified which page should shows as a frontpage for all languages
@fathimasavas,
That’s strange! The above code which I gave you is used to modify the Frontpage ID to get the proper Frontpage and it seems that your other languages are loading single.php instead of page.php/frontpage.php.
Can you contact us at team@magazine3.com? I will personally check this issue of yours and will resolve it for sure.
Thanks, email has been sent.
Hello @fathimasavas
Thank you, we will look into the issue there personally and will solve it for you.