• Resolved sukhwinder05

    (@sukhwinder05)


    Hey,
    I hope you are doing great!

    I have implemented amp on my website, but the amp version of my page is broken. There around 58 validation error from css, html and script.

    Can you please help me a little more to get this resolved. I really don’t have any idea what to do. Can you please tell me how can i create custom template for “Transitional Mode”.

    I really appreciate you, Thank you in advance.
    Looking forward to hearing from you soon ??

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • @sukhwinder05 Looking at your site you are using a custom developed theme, which is not amp compatible. It’s possible some of your plugins do not work by default in AMP (ie – they feature custom JavaScript on the front end).

    You can use the plugins validation tool to work through the validation errors, there is a section here on the plugin website with information on handling errors.

    You can also use the plugin in reader mode, which provides a basic amp valid template. To create your own templates using reader create a folder called amp in your active themes root directory. Then copy any of the files from within the plugins templates folder. Modify the files inside your themes amp folder to suit your preferences.

    If your theme was built from a fork of an amp compatible theme another option is to could use that original theme in a staging or test environment and re-modify it while using the validation tool to work through highlighted errors.

    Thread Starter sukhwinder05

    (@sukhwinder05)

    Hey @jamesosborne
    Thanks for your help, but i have some questions, I have added add_theme_support and update all the templates like header, footer and single in reader mode everything was working fine, but when i am switching to Transitional Mode my amp page is broken and display me “The site is experiencing technical difficulties.” Error.

    Can you please help me how can I modifiy my templates according to my needs in Transitional Mode

    @sukhwinder05 You may have a syntax error, code misplacement or function problem which is causing the issue, which relates to a fatal PHP error.

    You can try to change your theme and see if the same issue arises, even in AMP reader mode your functions.php file is used. If another theme works then work though the code in functions.php in the original theme.

    You can also enable debugging and check the error logs.

    Another troubleshooting step you can take is to temporary rename any of your custom templates so they revert to the plugins original templates.?

    Thread Starter sukhwinder05

    (@sukhwinder05)

    @jamesosborne I have implemented customization for Transitional mode.
    Now my main issue is how can i redirect all my mobile users to amp version of the page instead of normal page.

    I am using Transitional Mode.

    Thank you in advance!

    If you are looking to redirect all mobile users to the AMP version you can install the following extension (click on the “Download ZIP” and then upload/install as you would any other WordPress plugin).
    https://gist.github.com/westonruter/787c875e5ab724808c26014153e46ec6

    If you want to keep all internal links within AMP (once visitors arrive on an AMP URL) you can use the following plugin extension: https://gist.github.com/westonruter/f9ee9ea717d52471bae092879e3d52b0

    Thread Starter sukhwinder05

    (@sukhwinder05)

    Hey @jamesosborne

    Thank you for your help, everything is working well for me now, the only thing is not working is menus. Menus are working fine on https://13.233.155.0/newapptunix/blog/how-instacart-works-business-model-of-the-best-supermarket-in-your-app-store/?amp but same menus are broken on https://13.233.155.0/newapptunix/?amp.

    Can you please help, I already spent my 2 days to get this resolved but so strange don’t no why this happens to me with same menus

    Thread Starter sukhwinder05

    (@sukhwinder05)

    One more thing can you please help me how can i customize any page templates. My whole website is working fine with amp except pages with page templates.

    @sukhwinder05 I see you managed to get the menus working. To create your own page template copy the page.php file from the amp plugins directly (wp-content/plugins/amp/templates) into a newly created folder titled amp in your active themes root directory. The page.php file within that folder will overwrite the plugins reader mode templates.

    You can find out more information on the plugins website, there’s a section titled “Custom Template”.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘AMP version website broken’ is closed to new replies.