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

{SHARE} Tutorial Sitemap Buatan Sendiri

Discussion in 'Wordpress' started by zizot05, Sep 27, 2010.

  1. zizot05

    zizot05 Super Hero

    Joined:
    Nov 1, 2009
    Messages:
    1,478
    Likes Received:
    61
    Location:
    Plat F
    kali ini ane mo share cara buat sitemap bikinan sendiri klo repost ane mohon maaf :malaikat:

    ooh iya ane baru nyoba kode ini diwordpress kg tau klo diblogcepot work apa kg:hmm:

    oke lah klo beg....beg...begitu begini cerita'y :lol: :

    pertama copy file page.php di themes kalian alamat lengkap'y ada dibawah ini:

    namadomain.com/wp-content/themes/nama themes yang sedang dipakai/page.php

    dicatet yah hati2 nyasar coz ane kg bakal nganterin balik:peace:

    nah klo dah ketemu rename dah tuh file jadi sitemap.php

    second edit file sitemap.php dengan cara open with dreamweaver or notepad++ (pake aplikasi lain juga boleh yg penting ok:)>-)

    trus cari kode ini
    Code:
    <?php the_content(); ?>
    trus direplace sama yang ini
    Code:
                             <h3>Pages</h3>
                                <ul><?php wp_list_pages("title_li=" ); ?></ul>
                            <h3>Feeds</h3>
                                <ul>
                                    <li><a title="Full content" href="feed:<?php bloginfo('rss2_url'); ?>">Main RSS</a></li>
                                    <li><a title="Comment Feed" href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comment Feed</a></li>
                                </ul>
                            <h3>Categories</h3>
                                <ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0&feed=RSS'); ?></ul>
                            <h3>All Blog Posts:</h3>
                                <ul><?php $archive_query = new WP_Query('showposts=1000&cat=-8');
                                        while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
                                            <li>
                                                <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
                                             (<?php comments_number('0', '1', '%'); ?>)
                                            </li>
                                        <?php endwhile; ?>
                                </ul>
    
                            <h3>Archives</h3>
                                <ul>
                                    <?php wp_get_archives('type=monthly&show_post_count=true'); ?>
                                </ul>
    
    nah klo dah beres jangan lupa disisipkan kode ini (masih dalam file sitemap.php tadi
    Code:
    <?php
    /*
    Template Name: Sitemap
    */
    ?>
    klo ane hasil jadi'y model gini

    Code:
    <?php get_header(); ?>
    /*
    Template Name: Sitemap
    <div id="content">
    
    	<div id="contentleft">
    	
    		<div class="postarea">
    	
    		<?php include(TEMPLATEPATH."/breadcrumb.php");?>
    			
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    			<h1><?php the_title(); ?></h1><br />
    		
    			                         <h3>Pages</h3>
                                <ul><?php wp_list_pages("title_li=" ); ?></ul>
                            <h3>Feeds</h3>
                                <ul>
                                    <li><a title="Full content" href="feed:<?php bloginfo('rss2_url'); ?>">Main RSS</a></li>
                                    <li><a title="Comment Feed" href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comment Feed</a></li>
                                </ul>
                            <h3>Categories</h3>
                                <ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0&feed=RSS'); ?></ul>
                            <h3>All Blog Posts:</h3>
                                <ul><?php $archive_query = new WP_Query('showposts=1000&cat=-8');
                                        while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
                                            <li>
                                                <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
                                             (<?php comments_number('0', '1', '%'); ?>)
                                            </li>
                                        <?php endwhile; ?>
                                </ul>
    
                            <h3>Archives</h3>
                                <ul>
                                    <?php wp_get_archives('type=monthly&show_post_count=true'); ?>
                                </ul>
    
    			<?php endwhile; else: ?>
    			
    			<p><?php _e('Sorry, no posts matched your criteria.', 'studiopress'); ?></p><?php endif; ?>
    		
    		</div>
    		
    	</div>
    	
    <?php include(TEMPLATEPATH."/sidebar.php");?>
    		
    </div>
    
    <?php // The main column ends  ?>
    *\
    <?php get_footer(); ?>
    ud beres ngoprek kode'y sekarang kita lanjut masuk ke dashboard

    [​IMG]

    buat page baru dengan Judul Sitemap trus pada ribut attribut box pilih sitemap template lalu publish dan jadi deh sitemap baru hasil koding "sendiri" :gembira:

    biasa motto ane klo bikin thread "You follow i Follow" :cerutu:

    NB:Ane belum nyoba secara live dihosting tp klo dilocalhost sih jalan
     
    stalin, degrees22, mooven and 8 others like this.
  2. cutlem2009

    cutlem2009 Super Hero

    Joined:
    Nov 30, 2009
    Messages:
    3,578
    Likes Received:
    713
    Bookmark dulu om .. ;) like sudah meluncur.
     
    zizot05 likes this.
  3. dj_emb

    dj_emb Super Hero

    Joined:
    May 20, 2010
    Messages:
    1,179
    Likes Received:
    26
    Location:
    South Jakarta
    Mantappp gan info dan idenya,,,

    Kok di awal kalimat "sory kalau repost" gan??
    Ide sendiri pasti g mgkn repost gaan :silau:
     
  4. masheko

    masheko Hero

    Joined:
    Aug 20, 2009
    Messages:
    712
    Likes Received:
    20
    mantap Gan...
     
  5. virtarich

    virtarich Super Hero

    Joined:
    Feb 17, 2010
    Messages:
    1,572
    Likes Received:
    2,324
    Location:
    theme-id.com
    wow , ane langsung praktek gan , thanks meluncur
     
    zizot05 likes this.
  6. sipud

    sipud Ads.id Pro

    Joined:
    Sep 27, 2010
    Messages:
    338
    Likes Received:
    2
    Location:
    Pedesa'an Yang Indah
    bagus gan..
    nyobaj praktek ja gan..
     
  7. engkusplus

    engkusplus Super Hero

    Joined:
    Oct 7, 2009
    Messages:
    1,910
    Likes Received:
    76
    Location:
    Jember Jatim
    gan mau tanya saya udah praktek dan sukses. tapi waktu mau submit sitemapnya di google webmasters kok gak bisa ya gan.. soalnya kan http://namadomain.com/sitemap doang tanpa xml .
    maksudnya kalo di buka pakek namadomain.com/sitemap bisa gan. tapi kalo pakek sitemap.xml gak bisa .. mohon bantuannya ya gan..
     
  8. za2n456

    za2n456 Ads.id Fan

    Joined:
    Aug 16, 2010
    Messages:
    237
    Likes Received:
    2
    kalo buat disubmit di google webmaster pake plugin gan, google xml sitemap..
    yg akan menggenerate sitemap secara otomatis..
    klo tutor nya bro TS, sitemap bwt pengunjung bukan bwt robot google..
    CMIIW
     
  9. engkusplus

    engkusplus Super Hero

    Joined:
    Oct 7, 2009
    Messages:
    1,910
    Likes Received:
    76
    Location:
    Jember Jatim
    jadi begitu.. makasih ya gan...
     
  10. dteepz

    dteepz Ads.id Fan

    Joined:
    Dec 13, 2009
    Messages:
    169
    Likes Received:
    1
    Location:
    Surabaya - Indonesia
    wah langsung saya praktekin.....
     
  11. mazaldo

    mazaldo Ads.id Fan

    Joined:
    Jan 27, 2010
    Messages:
    165
    Likes Received:
    3
    Location:
    Dunia Maya
    makasih gan.. dicoba dulu....
     
  12. mooven

    mooven Hero

    Joined:
    Oct 3, 2009
    Messages:
    654
    Likes Received:
    33
    Location:
    Soerabaia - Lamongan
    thanks mas brow. btw, ini bz jd pengganti dagon design sitemap yach?
     
  13. matmund

    matmund Ads.id Pro

    Joined:
    Oct 5, 2010
    Messages:
    319
    Likes Received:
    100
    Location:
    Sumedang
    bagus jga ide'a... praktek gan..
     
  14. riFFrizz

    riFFrizz Super Hero

    Joined:
    Jan 7, 2011
    Messages:
    1,531
    Likes Received:
    325
    Location:
    Kotareyog
    bookmaark dulu, selama ini saya makek plugin :D
     
  15. yuyudhar

    yuyudhar Super Hero

    Joined:
    Sep 3, 2006
    Messages:
    1,372
    Likes Received:
    39
    dari tadi keliling2 cari infor sitemap buat pengunjung, ternyata disini adanya.
     
  16. dteepz

    dteepz Ads.id Fan

    Joined:
    Dec 13, 2009
    Messages:
    169
    Likes Received:
    1
    Location:
    Surabaya - Indonesia
    tengkyuh so much....tipsnya maknyesss...tanpa error
     
  17. Kholil Aziz

    Kholil Aziz Ads.id Starter

    Joined:
    Mar 9, 2014
    Messages:
    82
    Likes Received:
    0
    Location:
    Madura - Surabaya
    terima kasih tutorialnya
     
  18. nino-id

    nino-id Hero

    Joined:
    Oct 25, 2011
    Messages:
    588
    Likes Received:
    25
    ok gan. makasih sharenya
     

Share This Page