[Resolved] Enable AMP With Generate Press

Home Forums Support [Resolved] Enable AMP With Generate Press

Home Forums Support Enable AMP With Generate Press

Viewing 15 posts - 1 through 15 (of 42 total)
  • Author
    Posts
  • #786075
    Sibi Paul

    Sir,

    I Would Like to Have AMP Page For my Website.

    Installed the Official Plugin by Google and Automattic – https://wordpress.org/plugins/amp/

    I chose the Native Template Mode.

    After Install I tested my Home Page and Posts With This Validator – https://search.google.com/test/amp

    Also tested With This Validator – https://validator.ampproject.org

    I got AMP Pass Result Both…

    When I came to my WP Dashboard.

    I can See Some Errors

    AMP Validation Error Index

    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted

    JS 58 mins ago 0
    Select 2e20f896a515e68893ca695e7658642d
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted

    JS 58 mins ago 0
    Select bd9541272a9e1c5214952b37a345a27f
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <body>
    JS 58 mins ago 1
    Select 5303fe2fd3d6b1af0ced77a6045b943c
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <body>
    JS 58 mins ago 1
    Select 5a066f396b127e398b3f96ff71443993
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <body>
    JS 58 mins ago 1
    Select cc0767350c977be74ca29e5e80b8e5d7
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <body>
    JS 58 mins ago 1
    Select 97aa66ecfc8ba9ef964a4de313c6238b
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <body>
    JS 58 mins ago 1
    Select 330d55d4ca8ab51a875d1fdd779e88cd
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <body> JS 58 mins ago 1
    Select 2629f69de9405d6680ea353a4b189e26
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <body>
    JS 58 mins ago 1
    Select c07583d99ec9384a0e4b87051d6ae722
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <head> JS 58 mins ago 1
    Select dd3520a3b76a4c0898180e2a07c01fff
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <head>
    JS 58 mins ago 1
    Select c7139969952390dbd2e6b3f9343d74de
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <head>
    JS 58 mins ago 1
    Select e8bd39bb592c74b9a2b52dc5cf3a86bf
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <head>
    JS 58 mins ago 1
    Select 031d0de7aa02a226db8b9b32dcca8f9d
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <head>
    JS 58 mins ago 1
    Select 2bffde50869629c302045a8da6a826ee
    invalid_element: <script>

    Clear this cache | Details | Reject | Accept
    New Accepted
    <head>
    JS 58 mins ago 1
    Select 081af952a2e8964e2790de7b23cc7049
    illegal_css_at_rule: @-ms-viewport

    Clear this cache | Details | Reject | Accept
    New Accepted
    <link>
    CSS 58 mins ago 1

    ———————————-

    Actually, I don’t Know What is This ?

    is There any harm on My Site, When I am Using This Plugin with GP ? ( i Only Worried that )

    AMP Validated URLs

    one url

    URL
    Status Invalid Sources
    Last Checked
    Select /2019/01/19/(url-removed).html
    β€œ/2019/01/19/(url-removed).html” is locked
    /2019/01/19/(url-removed).html
    Details | Clear this cache | View | Recheck | Forget
    New Accepted: 14
    script (13)
    Plugins (3)
    GeneratePress
    18 mins ago

    (url-removed) – for secure from public

    I am new to AMP

    So Can you please check above details carefully, and reply me with complete details ?

    #786344
    David
    Staff
    Customer Support

    Hi there,

    this is outside of our Scope, issues with AMP need to be address with the plugin author. But those errors look like they are cache related so why not try the Clear this Cache option they offer.

    #796465
    Sibi Paul

    when use default themes, there is no validation errors…

    this error happened only with generate press theme activated

    #796781
    Tom
    Lead Developer
    Lead Developer

    What do these errors look like in the Dashboard? Can you show us a screenshot?

    Let me know πŸ™‚

    #797069
    Sibi Paul

    Finally, I found the Problem.

    Deactivate GP Premium Plugin, Then AMP is Valid here –

    https://search.google.com/test/amp?id=xJiqmf81nRDpf_fiwfIXHg

    When GP Premium is Activated, Then I’m getting this Error – https://search.google.com/test/amp?id=1rwpmIk129v3Bt3fu16osA

    NOW, I have Enabled GP Premium Plugin

    So You can See the Errors From Your End

    Please Go Here – https://validator.ampproject.org/

    Also here – https://search.google.com/test/amp

    And Enter my Site’s Post URL ( http://www.site.com/post.html/amp ) or ( http://www.site.com/post.html?amp )

    Then You Can see Errors from Your end.

    #797085
    Sibi Paul

    I found Something more.

    GP Premium Activated – But Elements Deactivated

    Then Also AMP Valid πŸ™‚ – Check this https://search.google.com/test/amp?id=BmYNkj54-0k9wkH2Z7FRuA

    So Problem with Elements

    When Elements Activated – https://search.google.com/test/amp?id=tdEQ1l3ima4y0trPPSVy0w

    Now, Everything is Activated, So Please test From Your end with

    https://validator.ampproject.org/

    https://search.google.com/test/amp

    Please Do Something to Sort out the Actual issue.

    NB: if you needed, I can share you CPANEL & WP Admin Credentials.

    #797177
    Tom
    Lead Developer
    Lead Developer

    Do you have any Elements added? If so, what happens if you temporarily set them all as “Drafts”?

    #797399
    Sibi Paul

    Hi,

    I found The Actual Elements Causing this Error.

    I have two Elements created for Adsense

    NB: No Other Elements making Error

    When I googled for Adsense for AMP

    I found This – https://www.ampproject.org/docs/reference/components/amp-auto-ads

    so I created an Element as hook and added this script in WP head – Entire site

    <script async custom-element=”amp-auto-ads”
    src=”https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js”&gt;
    </script>

    According to the Above Link

    I Need to add another hook with auto ads code

    so I have copied my AMP Auto ads code

    <amp-auto-ads
    type=”adsense”
    data-ad-client=”ca-pub-5439573510495356″>
    </amp-auto-ads>

    Created another hook – wp head – entire site.

    Then I am getting Errors…. as you seen in the above test links.

    #797401
    Sibi Paul

    While I typing above Post to describe you the Error, detail….

    I noticed

    <amp-auto-ads
    type=”adsense”
    data-ad-client=”ca-pub-5439573510495356″>
    </amp-auto-ads>

    this Code Should be somewhere before </body>

    but I have added it in the WP Head.

    So, I changed the hook to WP footer – entire site.

    Yaaahhoooo….

    Error , Fixed πŸ™‚

    Now, Adsense and Google Analytics everything working good along with generate press + AMP

    I am plannning to post an Article in my WordPress Blog , about How to use AMP in Generatepress Theme.

    Wish me good Luck πŸ™‚

    #797433
    Sibi Paul

    When i Post a New Article, I get this Warning message on the Dashboard

    ” There is content which fails AMP validation. However, your site is configured to automatically accept sanitization of the offending markup. You should review the issues to confirm whether or not sanitization should be accepted or rejected. Review issues

    Invalid elements: script (15) ”

    can you tell me what is this ?

    #797766
    Tom
    Lead Developer
    Lead Developer

    I’m not sure what that means. Are there more details on the error anywhere?

    #797776
    Sibi Paul

    To address the Actual Issues – I have started a New Thread with Fresh WP Installations

    https://generatepress.com/forums/topic/amp-validation-error-index-in-generatepress-theme/

    Please Check this… πŸ™‚

    #844940
    Tom
    Lead Developer
    Lead Developer

    Just a heads up that I’ve started the plugin here: https://github.com/tomusborne/amp-for-generatepress

    Once it’s ready I’ll upload it to WordPress.org πŸ™‚

    #950756
    Ryan

    Great, I was actually thinking of switching themes to get better amp compatibility but I’m glad to see you working on it with the plugin, thanks! I still can’t get the mobile menu working on amp on my website at https://www.ryansmithphotography.com

    #950854
    Tom
    Lead Developer
    Lead Developer

    Strange, does it work with the regular navigation (not mobile header)?

Viewing 15 posts - 1 through 15 (of 42 total)
  • You must be logged in to reply to this topic.