• Resolved edsbali

    (@edsbali)


    Thank for this awesome plugin.
    I wonder if there any way to insert html code right after <body> tag.
    In “Advance settings” there are possible to enter html code in header and footer.

    Regard,
    Editanka

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,
    What code ?
    thank you,

    Very cordially,

    Fabian

    First of all why would you want to do this?

    Easiest way is to use the AMP editor to make your specific AMP page.

    If you wish to automate it (i.e. it is the same for all similar page or post types) then you will need to add an action in functions.php which places that html.

    Hi @edsbali,

    Where exactly you want to enter after body tag? Can you specify it?
    You can check hooks also, we have hooks at many places
    for example: `ampforwp_header_top_design1
    ampforwp_header_bottom_design1
    ampforwp_design_1_after_header`
    etc..,

    If you can specify with an use case, I may be able to help you with a proper solution.

    Regards
    Marqas

    Thread Starter edsbali

    (@edsbali)

    I want to implement AMP Auto Text And Display Ads from Google Adsense Lab.
    Google said :
    1. First, place this code in between the <head> and </head> tags:
    <script async custom-element=”amp-auto-ads” src=”https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js”></script&gt;
    2. Then place this code right after after the <body> tag:
    <amp-auto-ads type=”adsense” data-ad-client=”ca-pub-01234567890″></amp-auto-ads>

    Regard,
    Editanka

    Hi @edsbali,

    We have created this ticket in our Github and we will add this in our next update.

    reference: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/1059

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Inserting html code rigth after tag’ is closed to new replies.