Assalamualaikum Wr. Wb.
Merubah Label Menjadi Keyword
Hal ini bertujuan untuk menentukan keyword label yang sobat bidik menjadi keyword artikel. Sehingga nantinya artikel akan mempunyai keyword ganda. Yaitu keyword artikel yang sobat tulis dan keyword label yang sobat berikan. Sooo...sobat akan mempunyai 2 keyword yang saling menguntungkan.
Cara merubah label menjadi keyword adalah sebagai berikut :
1. Login ke blogspot sobat
2. Masuk ke Rancangan > Edit HTML
3. Kembangkan terlebih dahulu template dengan mencentang pilihan Expand Template Widget
4. Tekan Ctrl + F lalu cari kode berikut
<b:include data='blog' name='all-head-content'/>
<title><data:blog.pageTitle/></title>
<title><data:blog.pageTitle/></title>
Hapus saya kode tadi biar tidak terjadi penggandaan keyword Title
5. Lalu tambahkan kode berikut diatas <head>
<!--::::::::::: Block1: Output post meta keywords -->
<b:if cond='data:blog.pageType == "item"'>
<b:section id='meta1' showaddelement='no'>
<!-- widget must be a of Type = 'blog' to have posts data exposed, and must have a unique id -->
<!-- Empty Includables(functions) to output nothing, You must keep them ): -->
<b:widget id='Blog2' locked='no' type='Blog'>
<b:includable id='nextprev'/>
<b:includable id='backlinks' var='post'/>
<b:includable id='post' var='post' />
<b:includable id='status-message'/>
<b:includable id='comment-form' var='post'/>
<b:includable id='backlinkDeleteIcon' var='backlink'/>
<b:includable id='postQuickEdit' var='post'/>
<b:includable id='commentDeleteIcon' var='comment'/>
<b:includable id='feedLinks'/>
<b:includable id='feedLinksBody' var='links'/>
<b:includable id='comments' var='post'/>
<b:includable id='main' var='top'><!-- Main Function of Any widget comes with ID 'main' -->
<!-- Loop Page Posts (only 1 in a post page )-->
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.labels'>
<!-- If the post has labels, make Meta keywords by looping lables -->
<meta name="keywords" content="<b:loop values='data:post.labels' var='label'><data:label.name/><b:if cond='data:label.isLast != "true"'>,</b:if></b:loop>" />
</b:if>
</b:loop>
</b:includable>
</b:widget>
</b:section>
</b:if>
<!--::::::::::: Block1 END -->
<b:if cond='data:blog.pageType == "item"'>
<b:section id='meta1' showaddelement='no'>
<!-- widget must be a of Type = 'blog' to have posts data exposed, and must have a unique id -->
<!-- Empty Includables(functions) to output nothing, You must keep them ): -->
<b:widget id='Blog2' locked='no' type='Blog'>
<b:includable id='nextprev'/>
<b:includable id='backlinks' var='post'/>
<b:includable id='post' var='post' />
<b:includable id='status-message'/>
<b:includable id='comment-form' var='post'/>
<b:includable id='backlinkDeleteIcon' var='backlink'/>
<b:includable id='postQuickEdit' var='post'/>
<b:includable id='commentDeleteIcon' var='comment'/>
<b:includable id='feedLinks'/>
<b:includable id='feedLinksBody' var='links'/>
<b:includable id='comments' var='post'/>
<b:includable id='main' var='top'><!-- Main Function of Any widget comes with ID 'main' -->
<!-- Loop Page Posts (only 1 in a post page )-->
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.labels'>
<!-- If the post has labels, make Meta keywords by looping lables -->
<meta name="keywords" content="<b:loop values='data:post.labels' var='label'><data:label.name/><b:if cond='data:label.isLast != "true"'>,</b:if></b:loop>" />
</b:if>
</b:loop>
</b:includable>
</b:widget>
</b:section>
</b:if>
<!--::::::::::: Block1 END -->
6. Lalu tambahkan kode berikut dibawah <Head>
<!-- THE HEAD -->
<!-- must include(called) here to output other head sub elements -->
<b:include data='blog' name='all-head-content'/>
<!--::::::::::: Block2: Output Index Title,keywords,decription and Post Title,description -->
<!-- Post/Archive Page -->
<b:if cond='data:blog.pageType != "index"'>
<title><data:blog.pageName/></title>
<meta name='description' expr:content='data:blog.pageName' />
<!-- Index Page -->
<b:else/>
<title><data:blog.pageTitle/></title>
<meta name='keywords' content='your,blog,keywords!!' />
<meta name='description' content='your blog description!!' />
</b:if>
<!--::::::::::: Block2 END -->
<!-- must include(called) here to output other head sub elements -->
<b:include data='blog' name='all-head-content'/>
<!--::::::::::: Block2: Output Index Title,keywords,decription and Post Title,description -->
<!-- Post/Archive Page -->
<b:if cond='data:blog.pageType != "index"'>
<title><data:blog.pageName/></title>
<meta name='description' expr:content='data:blog.pageName' />
<!-- Index Page -->
<b:else/>
<title><data:blog.pageTitle/></title>
<meta name='keywords' content='your,blog,keywords!!' />
<meta name='description' content='your blog description!!' />
</b:if>
<!--::::::::::: Block2 END -->
7. Simpan template sobat dan silakan lihat hasilnya
Semoga dengan tutorial ini bisa membantu sobat dalam berblogging ria
Wassalamualaikum Wr. Wb.
1 komentar:
wah,,terim kasih infonya.
Posting Komentar