Cara Pasang Link di Sidebar yang hanya tampil di FrontPage Saja

Tuhkan beneran, blog ini mulai kena wabah lagi. Wabah postingan sampah paid review. Ya gara-gara pagerank naik kemarin ๐Ÿ™‚ . Yah disyukuri saja, namanya rejeki hehe. Jadi mohon maaf bagi pengunjung setia blog ini (emang ada? ๐Ÿ˜› ) atau pelanggan RSS FEED blog ini yang seringkali disuguhi postingan bahasa inggris gak penting. Itu juga demi hehe. Ya demi kelangsungan blog ini donk, kan butuh biaya juga ๐Ÿ˜› .

Ok, cukup basa-basinya. Kali ini saya mo curhat. Loh kok curhat terus? lha namanya juga blog personal. Definisi awal blog kan emang jurnal pribadi (definisi dari mane lage…) hehe. Curhatannya tentang ini lo, bagaimana cara pasang link di sidebar (khusus wordpress) yang hanya nongol di halaman depan doank (frontpage) ?. Kalau yang diakses selain frontpage, linknya gak muncul.

Pertanyaan ini muncul gara-gara ada beberapa advsertiser yang hanya mau linknya dipasang difrontpage doank. Padahal kan lebih untung kalau tampil disemua postingan ya? advertiser yang aneh ๐Ÿ˜› . Tapi namanya pelanggan itu semua adalah raja, jadi kudu dituruti ๐Ÿ˜€ .

Setelah nyari-nyari caranya, akhirnya ketemu. Saya tidak tahu apakah ada plugin khusus untuk masalah ini, yang jelas solusi saya ini agak manual cara kerjanya. Ok lets cekidot aja deh, semoga bermanfaat ๐Ÿ™‚ .

1. Kudu install plugin dulu. Plugin yang berfungsi untuk memasang script PHP pada WIDGET WP di sidebar. Seperti kita ketahui, widget TEXT di WP hanya bisa diisi oleh text, script HTML dan script JAVASCRIPT (CMIIW). Untuk Script PHP tidak bisa. Nah ada plugin yang bisa digunakan untuk itu.

Banyak kok plugin seperti ini. Terserah mau pakai yang mana saja. Salah satunya yang sering saya pakai adalah Widgetize Anything. Plugin ini terakhir saya install di WP 3.0.1 masih kompatibel. Untuk WP versi terbaru belum nyoba. Cara install, seting dan cara pakai pluginnya silahkan kunjungi blognya ok ๐Ÿ™‚

2. Nah sekarang script PHP yang kudu dipasang di plugin (poin 1) adalah kombinasi script PHP dan HTML. Kita memanfaatkan function di WP, yaitu function is_home(). Fungsinya untuk ngecek apakah URL yang diakses adalah frontpage atau bukan. Nah link yang hanya ingin ditampilkan di frontpage diletakkan dibawah/didalam function tersebut. Contohnya seperti dibawah ini :


echo '<ul>';
echo '<li><a href="http://www.link1.com/">LINK 1</a></li>';
echo '<li><a href="http://www.link2.com/">LINK 2</a></li>';
if (is_home()) {
echo '<li><a href="http://www.link3.com/">LINK 3</a></li>';
echo '<li><a href="http://www.link4.com/">LINK 4</a></li>';
}
echo '</ul>';

Nah LINK 3 dan LINK 4 hanya akan tampil dihalaman depan saja, jika dihalaman lain 2 link tersebut tidak ditampilkan. Style desain (CSS) nya ngikuti desain theme yang aktif di blog. Kalau mau customize ya silahkan saja dimodif script diatas ๐Ÿ™‚ .

Selesai ๐Ÿ™‚ . Selamat mencoba. Jika sudah ada plugin untuk kasus ini mohon infonya ya teman-teman. Kalau belum ada bisa nih saya buatkan pluginnya hehe.

Happy Blogging ๐Ÿ™‚

240 Comments

  1. Media Online News December 19, 2010 Reply
  2. Galih December 19, 2010 Reply
  3. tv show December 19, 2010 Reply
  4. cosmetic December 19, 2010 Reply
  5. health December 20, 2010 Reply
  6. Warung Bebas December 20, 2010 Reply
  7. SERBA GRATISAN December 20, 2010 Reply
  8. r4r4 December 20, 2010 Reply
  9. Anas December 20, 2010 Reply
  10. Kumpulan Informasi December 20, 2010 Reply
  11. Timontius December 20, 2010 Reply
  12. beasiswa December 20, 2010 Reply
  13. Jimmy December 20, 2010 Reply
  14. Asia Hotels Review December 21, 2010 Reply
  15. IndonesiaLanscape December 21, 2010 Reply
  16. soccer December 21, 2010 Reply
  17. about technology December 21, 2010 Reply
  18. vadanta may December 21, 2010 Reply
  19. choirul December 21, 2010 Reply
  20. about technology December 22, 2010 Reply
  21. advances in technology December 22, 2010 Reply
  22. health system canada December 22, 2010 Reply
  23. Diaz Adi December 22, 2010 Reply
  24. eko December 22, 2010 Reply
  25. stock index December 22, 2010 Reply
  26. how to have baby December 22, 2010 Reply
  27. xamthone plus December 23, 2010 Reply
  28. abdulroqib.com December 23, 2010 Reply
  29. baju muslim December 23, 2010 Reply
  30. yanto December 23, 2010 Reply
  31. HASRUL HARUNA RASYID December 23, 2010 Reply
  32. asrulvictory December 23, 2010 Reply
  33. Wawan Siswanto December 24, 2010 Reply
  34. inboxu December 24, 2010 Reply
  35. wong December 24, 2010 Reply
  36. mangtholib December 24, 2010 Reply
  37. indoomg December 24, 2010 Reply
  38. Baca News December 25, 2010 Reply
  39. eko December 25, 2010 Reply
  40. harga blackberry December 27, 2010 Reply
  41. bursa mobil bekas December 28, 2010 Reply
  42. Mumbai Florist December 29, 2010 Reply
  43. Cara Shalat Nabi December 29, 2010 Reply
  44. telur asin brebes December 30, 2010 Reply
  45. Dee January 6, 2011 Reply
  46. angga January 15, 2011 Reply
  47. eko January 15, 2011 Reply
  48. Gudang E-Books January 21, 2011 Reply
  49. rumahmode January 25, 2011 Reply
  50. javaukigoshi January 28, 2011 Reply
  51. java January 28, 2011 Reply
  52. j January 28, 2011 Reply
  53. I Putu Sudarma January 30, 2011 Reply
  54. forex indonesia February 9, 2011 Reply
  55. lastindo February 9, 2011 Reply
  56. zonakesehatan February 15, 2011 Reply
  57. hotel di bandung February 16, 2011 Reply
  58. david March 2, 2011 Reply
  59. resep masakan March 7, 2011 Reply
  60. Dody March 15, 2011 Reply
  61. Free Backlink March 24, 2011 Reply
  62. toko barnag unik April 2, 2011 Reply
  63. Mutiara Pembelajar April 6, 2011 Reply
  64. dila sela April 30, 2011 Reply
  65. aryo May 4, 2011 Reply
  66. tokosepeda May 11, 2011 Reply
  67. Kisah Hikmah May 12, 2011 Reply
  68. Penyejuk Hati May 12, 2011 Reply
  69. Fhariz May 12, 2011 Reply
  70. club asteria May 12, 2011 Reply
  71. cky May 14, 2011 Reply
  72. Stardoll May 21, 2011 Reply
  73. Alivatidro May 23, 2011 Reply
  74. dani June 11, 2011 Reply
  75. cheap seo service June 21, 2011 Reply
  76. arti zakat June 21, 2011 Reply
  77. resep masakan June 24, 2011 Reply
  78. herbalife July 3, 2011 Reply
  79. xamthoneplus July 11, 2011 Reply
  80. Baju Wanita July 22, 2011 Reply
  81. mazhanos July 24, 2011 Reply
  82. umarsyaha July 25, 2011 Reply
  83. computechiez July 27, 2011 Reply
  84. modif August 18, 2011 Reply
  85. Penjernih Air August 26, 2011 Reply
  86. kerja part time August 26, 2011 Reply
  87. Rina As September 8, 2011 Reply
  88. Info Dunia Wanita September 12, 2011 Reply
  89. aji October 28, 2011 Reply
  90. manji November 29, 2011 Reply
  91. Lowongan Kerja November 30, 2011 Reply
  92. plakat December 8, 2011 Reply
  93. komputer bekas December 26, 2011 Reply
  94. iklan kudus December 27, 2011 Reply
  95. Xamthone December 30, 2011 Reply
  96. jasa kontraktor January 12, 2012 Reply
  97. Diet Cara Alami January 13, 2012 Reply
  98. obat herbal alami January 14, 2012 Reply
  99. Diet Cara Alami January 15, 2012 Reply
  100. Jefry January 27, 2012 Reply
  101. satuwaktu.net February 1, 2012 Reply
  102. gamat luxor aceh February 11, 2012 Reply
  103. Jasa Desain Grafis February 22, 2012 Reply
  104. godream February 23, 2012 Reply
  105. dokter anak March 7, 2012 Reply
  106. spencer April 15, 2012 Reply
  107. puri April 23, 2012 Reply
  108. Tas Cantik April 24, 2012 Reply
  109. park avenue April 25, 2012 Reply
  110. 1 park residences April 25, 2012 Reply
  111. 1 park avenue April 26, 2012 Reply
  112. Alya May 10, 2012 Reply
  113. agen pulsa murah May 11, 2012 Reply
  114. Health web blog May 27, 2012 Reply
  115. les private June 13, 2012 Reply
  116. Poetra June 21, 2012 Reply
  117. agus August 7, 2012 Reply
  118. Tips & Tutorial September 5, 2012 Reply
  119. mulky September 5, 2012 Reply
  120. Dapah blog September 9, 2012 Reply
  121. Fussed Blogger October 1, 2012 Reply
  122. yamara November 2, 2012 Reply
  123. Yoga Permana November 23, 2012 Reply
  124. wong jember December 1, 2012 Reply
  125. Bakpia Pathok December 12, 2012 Reply
  126. Tie_zZZ December 16, 2012 Reply
  127. Erwin December 16, 2012 Reply
  128. sewa ac December 19, 2012 Reply
  129. barodast January 10, 2013 Reply
  130. rental jenset January 22, 2013 Reply
  131. Hanifa News January 25, 2013 Reply
  132. kenari February 15, 2013 Reply
  133. sarang walet February 15, 2013 Reply
  134. Taman February 15, 2013 Reply
  135. Kumpulan Tips dan Cara February 17, 2013 Reply
  136. Dianeka February 20, 2013 Reply
  137. cara cepat hamil February 22, 2013 Reply
  138. arusha March 3, 2013 Reply
  139. OnePromoShop March 6, 2013 Reply
  140. Jasa SEO March 8, 2013 Reply
  141. agen tiket pesawat March 21, 2013 Reply
  142. Jasa SEO Murah April 13, 2013 Reply
  143. infokostjogja April 22, 2013 Reply
  144. jual receiver May 1, 2013 Reply
  145. nur ace maxs May 9, 2013 Reply
  146. Whyu Tekaje May 23, 2013 Reply
  147. Toko Obat Herbal May 26, 2013 Reply
  148. Kerudung Cantik May 26, 2013 Reply
  149. download game June 18, 2013 Reply
  150. adiwaradanawijaya July 24, 2013 Reply
  151. OBC Bali August 12, 2013 Reply
  152. Nasi Kotak Surabaya August 26, 2013 Reply
  153. Furniture Jepara September 3, 2013 Reply
  154. obat herbal September 22, 2013 Reply
  155. jasa Seo Murah September 23, 2013 Reply
  156. AK3 Umum September 25, 2013 Reply
  157. Jual Frame Kacamata September 27, 2013 Reply
  158. Jual Obat Kuat Foredi Gel September 28, 2013 Reply
  159. capcay October 7, 2013 Reply
  160. Merah Delima October 7, 2013 Reply
  161. Private SEO October 14, 2013 Reply
  162. Sne Kapsul October 28, 2013 Reply
  163. Pulau Pari November 17, 2013 Reply
  164. Jajan Baju November 28, 2013 Reply
  165. Jual Frame Kacamata December 3, 2013 Reply
  166. fisioterapi.web.id December 17, 2013 Reply
  167. jual receiver HD December 18, 2013 Reply
  168. Jual Frame Kacamata December 18, 2013 Reply
  169. Aditya Pradana January 6, 2014 Reply
  170. jasa seo murah February 3, 2014 Reply
  171. Aftal February 10, 2014 Reply
  172. smartphone tercanggih February 15, 2014 Reply
  173. Kapsul Kecantikan February 18, 2014 Reply
  174. happycall February 22, 2014 Reply
  175. Gunawan Eka Saputra March 25, 2014 Reply
  176. Pulau Tidung March 27, 2014 Reply
  177. Anastasia April 21, 2014 Reply
  178. prima April 22, 2014 Reply
  179. Desain Rumah April 22, 2014 Reply
  180. Pulau Tidung April 30, 2014 Reply
  181. Pulau Pari April 30, 2014 Reply
  182. UBOcash May 31, 2014 Reply
  183. vimax June 15, 2014 Reply
  184. ID CARD MURAH September 1, 2014 Reply
  185. What Is Halloween October 1, 2014 Reply
  186. greenworld Indonesia October 16, 2014 Reply
  187. Jasa Penerjemah October 22, 2014 Reply
  188. ulfa December 26, 2014 Reply
  189. Belajar Ngeblog January 8, 2015 Reply
  190. info-anehdunia January 21, 2015 Reply
  191. kemo January 23, 2015 Reply
  192. Software Pulsa February 17, 2015 Reply
  193. TIPS PERAWATAN April 10, 2015 Reply
  194. minyak pelet April 20, 2015 Reply
  195. susu kambing April 23, 2015 Reply
  196. Mainan Anak April 27, 2015 Reply
  197. Aneu Skincare May 3, 2015 Reply
  198. agen jamkho May 25, 2015 Reply
  199. Nokia c1 January 14, 2016 Reply

Add a Comment

Your email address will not be published. Required fields are marked *