Cara Menampilkan Widget Hanya Di Halaman Tertentu

Jika anda jago coding, pasti anda tak begitu pusing menuliskan kode untuk membuat sebuah tampilan template situs website atau blog agar tampak indah nan rapi. Tapi bagaimana jika anda adalah orang awam mengenai hal kode-mengkode? Tentunya akan merasa bingung plus jengkel kalau tidak bisa sabar.

Nah, khusus artikel ini saya akan memberikan sepuluh kode HTML yang pastinya sesuai dengan harapan anda. Amin.

Silakan anda copy paste 'kode tambahan' yang sesuai dengan pilihan anda di bawah ini:


1. Widget muncul hanya di halaman depan saja (homepage)

<b:if cond='data:blog.url == data:blog.homepageUrl'>
---- your code in here ----
</b:if>

2. Widget tampil di semua halaman kecuali homepage.

<b:if cond='data:blog.url != data:blog.homepageUrl'>
---- your code in here ----
</b:if>

3. Widget muncul hanya di halaman archive saja.

<b:if cond='data:blog.pageType == &quot;archive&quot;'>
---- your code in here ----
</b:if>

4. Widget tampil di semua halaman kecuali halaman archive.

<b:if cond='data:blog.pageType != &quot;archive&quot;'>
---- your code in here ----
</b:if>

5. Widget muncul hanya di halaman posting.

<b:if cond='data:blog.pageType == &quot;item&quot;'>
---- your code in here ----
</b:if>

6. Widget tampil di semua halaman, kecuali halaman posting.

<b:if cond='data:blog.pageType != &quot;item&quot;'>
---- your code in here ----
</b:if>

7. Widget muncul hanya di postingan tertentu saja.

<b:if cond='data:blog.pageType == &quot;alamat-postingan&quot;'>
---- your code in here ----
</b:if>

8. Widget tampil selain di postingan tertentu.

<b:if cond='data:blog.pageType != &quot;alamat-postingan&quot;'>
---- your code in here ----
</b:if>

9. Widget muncul hanya di halaman staticpages.

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
---- your code in here ----
</b:if>

10. Widget tampil di semua halaman, kecuali halaman staticpages.

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
---- your code in here ----
</b:if>


Semoga artikel ini bermanfaat!

Related Posts →


Open Disqus Close Disqus

This site uses cookies from Google to deliver its services, to personalise ads and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies. Learn more