Hello @roxer82
Thank you for the support topic, You don’t need to add the script while using the AMP plugin, the AMP plugin will find out the AMP component being used & include the script required for it.
eg: if you use <amp-ad> component the plugin will enqueue the script required for it, you don’t need to include it specifically again.
I hope this helps!
Hi Milind, thanks for your answer.
You mean if I add it in head of my regular theme it will appear in the amp version? I’m using “Reader theme: AMP Legacy” for my AMP version.
Hello @roxer82
yes, I mean if you use a component in your theme which can be used as Transitional Mode or in Standard mode.
To add it in AMP Legacy theme (which is a different theme than your Regular theme)
You will have to use amp_post_template_head action hook.
In all three cases, you are not required to add the script manually. you just need to add the tag <amp-ad> in you page (it can be in head,body or footer) and the script will be included for the same by the AMP plugin.
I will recommend checking out our Guide for modifying Legacy Theme.
@roxer82 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!