
Admin
Well-Known Member
Staff member
Administrator
Today, tuoitreit.vn will teach you how to add amp adsense code to xenforo
1. Please go to Appearance > Styles > Default Style - Templates and edit template seo_amp_PAGE_CONTAINER
Find
And replace with
Find
And replace wth
Replace abcd and abcde with your data-ad-client and data-ad-slot
2. Go to Appearance > Styles > Default Style - Templates and edit template seo_amp_thread_view
Find
And replace with
Replace abcd and abcde with your data-ad-client and data-ad-slot
Good luck
Source tuoitreit.vn

1. Please go to Appearance > Styles > Default Style - Templates and edit template seo_amp_PAGE_CONTAINER
Find
JavaScript:
<script async src="https://cdn.ampproject.org/v0.js"></script>
JavaScript:
<script async custom-element="amp-auto-ads"
src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js">
HTML:
<xf:if is="$description is not empty">
HTML:
<amp-ad width="100vw" height=320
type="adsense"
data-ad-client="ca-pub-abcd"
data-ad-slot="abcde"
data-auto-format="rspv"
data-full-width>
<div overflow></div>
</amp-ad>
<xf:if is="$description is not empty">
2. Go to Appearance > Styles > Default Style - Templates and edit template seo_amp_thread_view
Find
HTML:
<div class="blockMessage" style="margin-top: 20px">
HTML:
<amp-ad width="100vw" height=320
type="adsense"
data-ad-client="ca-pub-abcd"
data-ad-slot="abcde"
data-auto-format="rspv"
data-full-width>
<div overflow></div>
</amp-ad>
<div class="blockMessage" style="margin-top: 20px">
Good luck
Source tuoitreit.vn