1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

TANYA cara buat link supaya tampil di home page saja (Tidak site wide)

Discussion in 'Desain Web & Grafis' started by agitsan, Apr 16, 2010.

  1. agitsan

    agitsan super duper keren

    Joined:
    Jul 27, 2009
    Messages:
    1,966
    Likes Received:
    41
    Location:
    MALANG-SBY PP
    TANYA cara buat link supaya tampil di home page saja (Tidak site wide) pada wordpres

    Para master yang jago dan berpengalaman ane punya masalah :pusing:
    saya pengen buat link cuma ditampilkan pada home page saja pada WORDPRESS yang self hosted , tidak site wide
    cara pasang linknya gimana yach?

    mohon di jawab , kalo seandainya sudah pernah di bahas ya tlg kasi tau URL threadnya, udah ane ublek 2 ni forum tp blm nemu jawaban :nangis:


    TERJAWAB SUDAH
    ADA 2 macam manual dan plugin

    manual


    makemin
    Code:
    <?php if(!is_home() && !(is_archive() || is_category())) : ?>
    hanya tampil di home, archive dan kategori
    <?php endif; ?>
    
    sama
    
    <?php if(is_home() || is_archive() || is_category()) : ?>
    hanya tampil di post
    <?php endif; ?>
    
    bangzenk
    Code:
    <?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
    Your Ads code or text link
    <?php } ?>
    
    ato biar lebih cantik
    
    <?php if (is_home()) { ?>
    <li class="widget"><h2>Resource Links</h2>
                            <ul class="linkcat">
    <li><a href="">blablabla</a></li>
                            </ul>
                        </li>
    <?php } ?>
    
    Gembel-intelek => cara ini is the best

    Code:
    <?php if(is_home() && !is_paged()) { ?>
    <li class="widget"><h2>Related Sites</h2>
                            <ul class="linkcat">
    <li>Your link here</li>
    
    
                            </ul>
                        </li>
    
    
    <?php } ?>
    

    prast => yang ini belum nyoba
    Code:
    <?php if(is_home()) { ?>
    <ul>
    <li><h2>Usefull Links</h2></li>
    
    <ul><li><a href="link anchor" target="_blank">Tecxt Anchor</a></li></ul>
    
    </ul>
    <?php } ?>
    
    Pake plugin tinggal pasang dan praktis bagi yang males coding

    syahur
    Code:
    wordpress.org/extend/plugins/widget-context
    
     
    Last edited: Apr 27, 2010
  2. gembel-intelek

    gembel-intelek Lurker

    Joined:
    Mar 29, 2009
    Messages:
    4,341
    Likes Received:
    907
    Location:
    New Coral
    wordpress? blogspot? ato lainnya?[​IMG]
     
  3. agitsan

    agitsan super duper keren

    Joined:
    Jul 27, 2009
    Messages:
    1,966
    Likes Received:
    41
    Location:
    MALANG-SBY PP
    sudah saya edit pertanyyan maaf kelewatan , pada wordpress yang self host bro
     
  4. danuakbar

    danuakbar Super Hero

    Joined:
    Oct 11, 2009
    Messages:
    3,138
    Likes Received:
    2,044
    pasang linknya di file index.php
     
  5. syahur

    syahur Super Hero

    Joined:
    May 8, 2008
    Messages:
    1,146
    Likes Received:
    71
    Location:
    Aceh
    pake plugin widget context gan...

    wordpress.org/extend/plugins/widget-context
     
    agitsan likes this.
  6. gembel-intelek

    gembel-intelek Lurker

    Joined:
    Mar 29, 2009
    Messages:
    4,341
    Likes Received:
    907
    Location:
    New Coral
  7. wayan02

    wayan02 Super Hero

    Joined:
    Dec 21, 2008
    Messages:
    1,132
    Likes Received:
    23
    Location:
    Solo
    mantabs..thank..ane jg lg cari...
     
  8. agitsan

    agitsan super duper keren

    Joined:
    Jul 27, 2009
    Messages:
    1,966
    Likes Received:
    41
    Location:
    MALANG-SBY PP
    sebenernya pengen edit manual tapi hasilnya jelek ,ya udah terpaksa pake plugin wordpress.org/extend/plugins/widget-context
    makasih untuk semua yang ngasih tau, hati2 kena tempok cendol gosong :lol:
     
  9. khoid

    khoid Super Hero

    Joined:
    Aug 18, 2008
    Messages:
    3,380
    Likes Received:
    256
    Location:
    depok
    ngapa ga pake
    Code:
    <?php if(is_home()){
    ####link####
    }
    ?>
     
  10. sandhiasmoro

    sandhiasmoro Ads.id Pro

    Joined:
    Apr 5, 2010
    Messages:
    482
    Likes Received:
    46
    Location:
    Jakarta
    waduh baru mau jawab, ngak kebagian cendol dong sob... tanya lagi dong sob.. biar kebagian cendol nih..:kembang:
     
  11. agitsan

    agitsan super duper keren

    Joined:
    Jul 27, 2009
    Messages:
    1,966
    Likes Received:
    41
    Location:
    MALANG-SBY PP
    udah nyoba2 sich pake koding yang manual sperti dibawah ini

    makemin
    Code:
    <?php if(!is_home() && !(is_archive() || is_category())) : ?>
    hanya tampil di home, archive dan kategori
    <?php endif; ?>
    
    sama
    
    <?php if(is_home() || is_archive() || is_category()) : ?>
    hanya tampil di post
    <?php endif; ?>
    
    bangzenk
    Code:
    <?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
    Your Ads code or text link
    <?php } ?>
    
    ato biar lebih cantik
    
    <?php if (is_home()) { ?>
    <li class="widget"><h2>Resource Links</h2>
                            <ul class="linkcat">
    <li><a href="">blablabla</a></li>
                            </ul>
                        </li>
    <?php } ?>
    

    hasilnya ga rapi boss , malah ada yang kadang2 loncat linknya ketengah di bawah post jd mutuskan pake plugin
     
  12. gembel-intelek

    gembel-intelek Lurker

    Joined:
    Mar 29, 2009
    Messages:
    4,341
    Likes Received:
    907
    Location:
    New Coral

    Udah coba versi ane? :komunis:

    Code:
    <?php if(is_home() && !is_paged()) { ?>
    <li class="widget"><h2>Related Sites</h2>
                            <ul class="linkcat">
    <li>[COLOR="red"]Your link here[/COLOR]</li>
    
    
                            </ul>
                        </li>
    
    
    <?php } ?>
    
     
    agitsan likes this.
  13. khoid

    khoid Super Hero

    Joined:
    Aug 18, 2008
    Messages:
    3,380
    Likes Received:
    256
    Location:
    depok
    ini udah pake is_home() kenapa pake !is_paged() lagi :hmm2:
    lah pan home udah pasti bukan page :hmm2:
     
  14. gembel-intelek

    gembel-intelek Lurker

    Joined:
    Mar 29, 2009
    Messages:
    4,341
    Likes Received:
    907
    Location:
    New Coral
    Soalnya kalo

    Code:
    [B][COLOR="red"]<?php if(is_home()) { ?>[/COLOR][/B]
    <li class="widget"><h2>Related Sites</h2>
                            <ul class="linkcat">
    <li>Your link here</li>
    
    
                            </ul>
                        </li>
    
    
    <?php } ?>


    linknya masih keliatan pas orang buka previous post

    Yoursite.com/page/2
    Yoursite.com/page/3
    d
    s
    t

    :bye:
     
  15. khoid

    khoid Super Hero

    Joined:
    Aug 18, 2008
    Messages:
    3,380
    Likes Received:
    256
    Location:
    depok
    oh salah, ane pikir is_page :damnmate::damnmate:
     
  16. prast

    prast Super Hero

    Joined:
    Mar 18, 2009
    Messages:
    1,796
    Likes Received:
    298
    Aku pakai

    <?php if(is_home()) { ?>
    <ul>
    <li><h2>Usefull Links</h2></li>

    <ul><li><a href="link anchor" target="_blank">Tecxt Anchor</a></li></ul>

    </ul>
    <?php } ?>

    Di Previus Page dst.. gak muncul kok linknya om..banyak versi neh scriptnya
     
  17. tanto

    tanto Super Hero

    Joined:
    Oct 2, 2006
    Messages:
    1,089
    Likes Received:
    85
    Location:
    jakarta
    caranya pake plugin exec-php.4.9

    nanti tulis linknya spt ini:

    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    <li><a href="http://www.domainkamu.com" target="_blank">kata kunci atau keyword</a></li>
    <?php } ?>
     
  18. shioyaki

    shioyaki Ads.id Fan

    Joined:
    Aug 1, 2010
    Messages:
    184
    Likes Received:
    9
    Location:
    Bandung
    hmm...ane butuh trik ini, tapi masih raba2. btw makasih yah!
     
  19. pekalongan

    pekalongan Super Hero

    Joined:
    Jan 26, 2010
    Messages:
    1,196
    Likes Received:
    51
    Location:
    Malang
    letakin di block, lalu kasih kode <front> kalo di drupal :)
     

Share This Page