Archived topic
Mobile menu not showing in standard AMP plugin
11 replies · Started by boaz on December 2, 2021
Hi,
Have gone through this topic:
https://generatepress.com/forums/topic/menu-in-amp/
added this plugin
https://github.com/tomusborne/amp-for-generatepress
and CSS
nav:not(.toggled) .menu-item:not(:hover) button.dropdown-menu-toggle.toggled-on + .sub-menu {
opacity: 0;
visibility: hidden;
height: 0;
}
nav:not(.toggled) button.dropdown-menu-toggle.toggled-on + .sub-menu {
position: absolute;
top: auto;
}
but still no show for menu
what should the off-canvas setting be ?
Thanks
Hi Boaz,
You have the same issue as this user:
https://generatepress.com/forums/topic/menu-in-amp/
Your site isn’t using the GeneratePress code-base at all, so we have no control over it.
Try what Tom suggested here:
https://generatepress.com/forums/topic/menu-in-amp/#post-1302440
Let me know :)
Hi Ying, so what is the solution ? does Generatepress have an AMP version ?
Have you tried Tom's suggestions I linked in my previous reply?
I would change those template modes until your AMP site looks like your regular site.
Right now they look completely different, which means there’s a separate template in play.
Hi Ying, i still dont understand.
do i use the official AMP plugin or not ? if so, in what settings. if not, how do i achieve an AMP layout ?
Thanks
Hi there,
GeneratePress does not have AMP built in.
You must use an AMP Plugin like this one:
Within its settings you should set the Template to Transitional.
In addition to that you also need to keep the AMP for GeneratePress plugin installed.
NOTE: You're AMP pages will NOT look like your non-amp pages. You may want to decide why you feel the need to add AMP ?
Thanks David,
We want to add the AMP support for SEO purpose.
Google forces you to do so, the page speed tests results are significantly higher when using AMP version.
You're welcome!
BTW,
In “AMP Settings” when trying to trying to save as “Transitional Template Mode”, im getting this error.
TypeError: Cannot read properties of undefined (reading ‘query_var’)
at u (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:40:1567)
at ni (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:74335)
at Bi (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:83853)
at Bc (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:127711)
at gs (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:113750)
at Ls (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:113678)
at hs (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:113541)
at us (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:110528)
at https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:60233
at t.unstable_runWithPriority (https://www.example.com/wp-content/plugins/amp/assets/js/amp-settings.js?ver=85a69fcacdf45677e3559bda1801aabc:60:137428)
Of course im checking this with AMP plugin support, but perhaps
you have seen this and know what it is related to ?
Its all related to the AMP plugin - the only i thing i can suggest is clearing any caches to see if thats affecting the scripts.
Thanks
You're welcome