Hello @webzer
Thank you for the support topic, the AMP legacy theme do not add navigation menu on your AMP page.
Can you please check which plugin is adding that navigation menu along with left and right sidebars?
The div’s with classes uk-navbar-container, uk-container etc. are being added to your site by some third-party plugin or your editor.
Alternatively please add the following code snippet in your active themes functions.php or in a custom plugin to fix the issue at some extent.
add_action(
'amp_post_template_css',
function () {
// only CSS here please...
?>
nav.uk-navbar-container .uk-navbar-left, header#site-header>.uk-container .uk-navbar-container .uk-navbar-right, #offcanvas-nav {
display: none;
}
main#site-main {
width: 100%;
display: inline-block;
position: relative;
clear: both;
}
footer.site-footer {
position: relative;
display: inline-block;
width: 100%;
height: auto;
}
header#site-header>.uk-container {
padding: 10px;
}
<?php
}
);
Thread Starter
webzer
(@webzer)
Hello @milindmore22
thanks for helping with this
I added this code to my theme’s functions.php but I didn’t notice any difference.
The navigation menu and sidebars are added by the theme used.
Hello @webzer
I think your theme is build differently than regular WordPress theme, that may be the reason CSS didn’t worked when it was added in functions.php
Can you please download and install this simple plugin and check if that works for you.
As I mentioned in my previous response The AMP legacy theme (The theme built-in AMP plugin) do no add any menus I will recommend contacting your theme author and check why it’s rendering header (menus) in content.
-
This reply was modified 4 years, 9 months ago by
Milind More.
@webzer Checking in here – were you able to download the plugin, and did that resolve your issue? Thanks!
@webzer
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.
Thread Starter
webzer
(@webzer)
Guys, thanks for the help with this.
I was able to identify the issue, is that our theme uses a nav menu with JavaScript that ends up causing problems on the page and breaking the layout. We will have to remove the nav menu for this template and try some other solution.
Do you have any tips for this?
I found this plugin in another thread but I still can’t get it to work on our site. I’m not sure it’s suitable for my case.
Thanks!!
Hello @webzer
Thanks for checking back with us, As we checked before your theme is built differently so we may not be able to help you remove the navigation menu, you will have to contact your theme author for the same.
but if you are looking for a navigation menu on Legacy Theme, feel free to checkout AMP Sidebar Hamburger Menu plugin
@webzer As we haven’t received a response, I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist. Thank you!