[Kiếm tiền online] Đăng ký sàn Mexc-Phí giao dịch thấp ...-> Bấm vào đây ...

👉Theo dõi Fanpage để nhận các kèo kiếm tiền miễn phí. Bấm vào đây
👉Tham gia Kênh Telegram theo dõi kèo kiếm COIN => Bấm vào đây
👉Tự đăng ký tài khoản chứng khoán miễn phí online - Bấm vào đây để đăng ký
Tự động chèn quảng cáo vào trong bài viết đối với blogspot là vấn đề quan tâm của nhiều người.Chèn sao cho tối ưu, phù hợp vị trí là điều nhiều người mong muốn.Việc chèn được nhiều quảng cáo vào trong bài viết ở các vị trí chỉ định trước là điều không hề đơn giản.


Bài này hướng dẫn các bạn 2 cách chèn quảng cáo vào giữa bài viết.

+ Cách 1: Chèn 4 quảng cáo vào trong bài viết với 2 vị trí trên cùng sau tiêu đề và dưới cùng cuối bài viết, cộng thêm 2 vị trí ở giữa bài viết có thể tùy chỉnh vị trí theo số lần xuống dòng của bài viết.

+ Cách 2: Tự động chèn duy nhất 1 vị trí quảng cáo ở giữa bài viết.

Chèn quảng cáo giữa bài viết tùy chỉnh vị trí

Bước 1 Thêm CSS
.atdbg-tdbget0 .widget,.atdbg-tdbget1 .widget,.atdbg-tdbget2 .widget,.atdbg-tdbget3 .widget,.atdbg-tdbget0 .widget-content,.atdbg-tdbget1 .widget-content,.atdbg-tdbget2 .widget-content,.atdbg-tdbget3  .widget-content{margin:0 !important;padding 0}
.atdbg-tdbget0 h2,.atdbg-tdbget1 h2,.atdbg-tdbget2 h2,.atdbg-tdbget3 h2{display:none}
#coke-atdbg-tdbget0 ins,#coke-atdbg-tdbget1 ins,#coke-atdbg-tdbget2 ins,#coke-atdbg-tdbget3 ins{margin:20px 0}
.post-body #coke-atdbg-tdbget0,.post-body #coke-atdbg-tdbget1,.post-body #coke-atdbg-tdbget2,.post-body #coke-atdbg-tdbget3{text-align:center;display:block}


Bước 2 Thêm Tiện ích.Thêm vào ngay sau thẻ đóng </b:section> của phần main
<b:section class='atdbg-tdbget0' id='atdbg-tdbget0' maxwidgets='1' showaddelement='yes'>
              <b:widget id='HTML996' locked='true' title='Ads in post custom' type='HTML' version='1'>
                <b:widget-settings>
                  <b:widget-setting name='content'/>
                </b:widget-settings>
                <b:includable id='main'>
   <b:if cond='data:blog.pageType in {&quot;item&quot;}'>
   <!-- only display title if it's non-empty -->
   <b:if cond='data:title != &quot;&quot;'>
  <h2 class='title'><data:title/></h2>
   </b:if>
   <div class='widget-content'>
     <div id='coke-atdbg-tdbget0'>
  <data:content/>
  </div>
   </div>
   </b:if>
   
   </b:includable>
              </b:widget>
            </b:section>  
  <b:section class='atdbg-tdbget1' id='atdbg-tdbget1' maxwidgets='1' showaddelement='yes'>
      <b:widget id='HTML997' locked='true' title='Ads in post custom-1' type='HTML' version='1'>
        <b:widget-settings>
          <b:widget-setting name='content'/>
        </b:widget-settings>
        <b:includable id='main'>
   <b:if cond='data:blog.pageType in {&quot;item&quot;}'>
   <!-- only display title if it's non-empty -->
   <b:if cond='data:title != &quot;&quot;'>
  <h2 class='title'><data:title/></h2>
   </b:if>
   <div class='widget-content'>
     <div id='coke-atdbg-tdbget1'>
  <data:content/>
  </div>
   </div>
   </b:if>
   </b:includable>
      </b:widget>
    </b:section>
  <b:section class='atdbg-tdbget2' id='atdbg-tdbget2' maxwidgets='1' showaddelement='yes'>
    <b:widget id='HTML998' locked='true' title='Ads in post custom-2' type='HTML' version='1'>
      <b:widget-settings>
        <b:widget-setting name='content'/>
      </b:widget-settings>
      <b:includable id='main'>
   <b:if cond='data:blog.pageType in {&quot;item&quot;}'>
   <!-- only display title if it's non-empty -->
   <b:if cond='data:title != &quot;&quot;'>
  <h2 class='title'><data:title/></h2>
   </b:if>
   <div class='widget-content'>
     <div id='coke-atdbg-tdbget2'>
  <data:content/>
  </div>
   </div>
   </b:if>
   </b:includable>
    </b:widget>
  </b:section>
  <b:section class='atdbg-tdbget3' id='atdbg-tdbget3' maxwidgets='1' showaddelement='yes'>
    <b:widget id='HTML999' locked='true' title='Ads in post custom-3' type='HTML' version='1'>
      <b:widget-settings>
        <b:widget-setting name='content'/>
      </b:widget-settings>
      <b:includable id='main'>
   <b:if cond='data:blog.pageType in {&quot;item&quot;}'>
   <!-- only display title if it's non-empty -->
   <b:if cond='data:title != &quot;&quot;'>
  <h2 class='title'><data:title/></h2>
   </b:if>
   <div class='widget-content'>
     <div id='coke-atdbg-tdbget3'>
  <data:content/>
  </div>
   </div>
   </b:if>
   
   </b:includable>
    </b:widget>
  </b:section>
Lưu ý: Không được xóa tiêu đề tiện ích.
Bước 3 Thêm javascript vào trước thẻ đóng </body>
<b:if cond='data:blog.pageType in {&quot;item&quot;}'>
<script type='text/javascript'>
function insertAfter(addition, konten) {
    var parent = konten.parentNode;
    if (parent.lastChild == konten) {
        parent.appendChild(addition);
    } else {
        parent.insertBefore(addition, konten.nextSibling);
    }
}
function insertAbove(addition, konten) {
    var parent = konten.parentNode;
 parent.insertBefore(addition, konten);
}
function insertBellow(addition) {
    var parent = konten;
 parent.appendChild(addition);
}
var atdbg0 = document.getElementById(&quot;coke-atdbg-tdbget0&quot;);
var atdbg1 = document.getElementById(&quot;coke-atdbg-tdbget1&quot;);
var atdbg2 = document.getElementById(&quot;coke-atdbg-tdbget2&quot;);
var atdbg3 = document.getElementById(&quot;coke-atdbg-tdbget3&quot;);
var konten = document.getElementById(&quot;body-post-it&quot;);
var lokasi = konten.getElementsByTagName(&quot;br&quot;);
if (lokasi.length &gt; 0) {
 insertAbove(atdbg0,konten); 
 insertBellow(atdbg3);
} 
if (lokasi.length &gt; 3) {
    insertAfter(atdbg1,lokasi[3]);
} 
else {
 atdbg1.innerHTML = &quot;&quot;;
}
if (lokasi.length &gt; 10) {
    insertAfter(atdbg2,lokasi[10]);
} 
else {
 atdbg2.innerHTML = &quot;&quot;;
}
</script>
</b:if>
Ở đây mặc định atdbg0 và atdbg3 là một ở trên đầu và một ở cuối cùng bài biết, còn lại atdbg1 và atdbg2 là 2 cái nằm ở giữa bài viết có thể căn chỉnh theo lần xuống dòng <br/> của bài viết bằng cách căn các giá trị 3 và 10 theo ý thích.
Ví dụ 3 là quảng cáo sẽ xuất hiện tại vị trí xuống dòng lần thứ 3.





Bước 4
Để code hoạt động được bạn cần thay 
<data:post.body/>
bằng

<div id='body-post-it'>
<data:post.body/>
</div>

Bước 5
Bạn chỉ việc vào bố cục tìm các tiện ích sau đó dán code quảng cáo vào rồi lưu lại.


Chèn duy nhất 1 vị trí quảng cáo ở giữa bài viết

Bước 1: Đăng nhập Blogger ~> Vào Mẫu ~> Chỉnh sửa HTML
Tìm đến thẻ hiển thị nội dung bài viết <data:post.body/> và thay thẻ này bằng đoạn code sau

Lưu ý:Do thiết kế template có nhiều khác nhau nên thẻ trên có thể không nằm trong thẻ điều kiện nào nhưng cũng có thể nằm trong thẻ điều kiện do vậy chú ý thẻ nằm trong thẻ điều kiện chỉ xuất hiện ở trang bài viết(item)

<div expr:id='&quot;zet1&quot; + data:post.id'/>
<div class='googlezet'>
Chèn code quảng cáo của bạn ở đây
</div>
<div expr:id='&quot;zet2&quot; + data:post.id'><p><data:post.body/></p></div>
<script type='text/javascript'>
var obj0=document.getElementById(&quot;zet1<data:post.id/>&quot;);var obj1=document.getElementById(&quot;zet2<data:post.id/>&quot;);var s=obj1.innerHTML;var t=s.substr(0,s.length/2);var r=t.lastIndexOf(&quot;&lt;br&gt;&quot;);if(r&gt;0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
</script>

Bước 2: Thêm đoạn css này vào trước thẻ đóng ]]></b:skin>

.googlezet{margin:15px auto;text-align:center}


( Bạn tải file đọc này về mà làm nhé , có chữ Download  ở dưới khung bài viết
Có thể bạn quan tâm các kênh kiếm tiền online

Tham gia kênh telegram chuyên nhận kèo kiếm tiền miễn phí

I.Đào coin - Tiền điện tử miễn phí


II. Đăng ký tài khoản - nhận coin, tiền điện tử (Nhận coin sàn)

Đăng ký tài khoản - nhận coin sàn miễn phí - giữ chặt để bán

III. Sàn giao dịch Coin

Link đăng ký sàn Coinsavi vừa đào coin sàn vừa giao dịch 320 loại coin

Link đăng ký Sàn REMITANO

Link đăng ký sàn BINANCE - Sàn giao dịch tiền điện tử số 1 thế giới

Link đăng ký sàn MEXC (MXC)- Sàn giao dịch tiền điện tử list nhiều coin mới

Link đăng ký sàn OKX - Ví web3

Link đăng ký sàn HUOBI - Sàn giao dịch coin hàng đầu thé giới

Link đăng ký sàn VNDC- Sàn giao dịch tiền điện tử Việt Nam

Link đăng ký sàn ATTLAS- Sàn giao dịch tiền điện tử Việt Nam

Link đăng ký sàn Bybit- Sàn giao dịch tiền điện tử mới nhiều ưu đãi

Link đăng ký sàn Gate - Sàn giao dịch tiền điện tử list nhiều coin mới

Link đăng ký sàn Gate - Sàn giao dịch tiền điện tử list nhiều coin mới

V. Chứng khoán

Hướng dẫn mở tài khoản chứng khoán trên điện thoại - Ở nhà cũng mở được để kiếm tiền mọi noi mọi lúc

Tham gia kênh Telegram theo dõi kèo kiếm coin miễn phí=> Bấm vào đây
Tìm hiểu những rủi ro khi giao dịch P2P - Bấm vào đây
👉Bấm Like để nhận các kèo kiếm tiền miễn phí

#BNB #BSC #claim #airdrop #bnb #cake #smartchain #airdropclaim #airdropclaimtoken #airdropclaimtamil #airdropclaimsinhala #airdropclaimcheck #airdropclaimfree #booyahappairdropclaim #1inchairdropclaim #coinmarketcapairdropclaim #freefireairdrop #claimairdroptokens #claimairdropfree #claimairdrops #claimairdroptrustwallet #claimairdropspa #claimairdropmetamask #claimairdropbsc#claimairdropbinance; #chung khoan; # mo tai khoan chung khoan; # mo tai khoan chung khoan online; # giao dich chung khoan; # chung khoan MBS; #MBS; #Đào coin; #đào coin bằng điện thoại;#BTC;#Bitcoin;#Tiền điện tử; # Tiền ảo

0 comments Blogger 0 Facebook

Post a Comment



 
Airdrop, Claim, Presale, IDO, MMO, Crypto, Coin, Token, Stock, Mining coin ©Email: Daocoin0983@gmail.com. All Rights Reserved. Powered by >How to best
Link:Bantintuvan|tailieusupham|Cây xanh đẹp|SKKN hay|Soidiemchontruong|dayvahoctot|diemthivao10hoctrenmobile|tradiemthituyensinh|Travel - Du lịch
Lớp 9: Ngữ văn | Toán | Tiếng Anh |Lịch sử |Địa lí | GDCD |
Trắc nghiệm lớp 9: Lịch sử
Lớp 12Ngữ văn|Toán|Tiếng Anh| Hóa học | Sinh học | Vật lí |Lịch sử|Địa lí|GDCD|
Top