Selasa, 16 November 2010

Memasang Script Di Tema MobilePress

MobilePress Memasang Script Di Tema MobilePress

Malam mulai menunjukkan jam 12 malam, saat saya beranjak ke tempat tidur untuk melepas semua penat dibadan, lalu datanglah sebuah SMS misterius, lalu dengan perasaan yang tidak karuan saya membuka SMS tersebut, Lalu….

Hahahaha…. Seperti cerita Horor saja ya bro icon biggrin Memasang Script Di Tema MobilePress

SMS tersebut dari salah satu pengunjung lucksoft.co.cc, dia bertanya kepada saya bagaimana cara memasang script iklan di MobilePress. Untuk itu saya meluangkan waktu untuk menulis artikel ini dengan harapan bahwa nanti akan berguna bagi siapa saja yang ingin memasang script di tema MobilePress.

Sebelumnya saya ingin menjelaskan apa itu MobilePress (Bagi yang belum tahu).

MobilePress adalah salah satu dari beberapa plugin WordPress yang dapat membuat blog anda menjadi Mobile Friendly (Mendukung Versi Mobile).

Dalam artikel ini saya akan berbagi pengalaman saya mengedit tema MobilePress, disini anda tidak hanya saya ajarkan cara memasang script iklan saja, melainkan memasang script php dari plugin tertentu ke dalam tema MobilePress, seperti Artikel Terkait, Random Post, SEO Search Term 2.

Untuk memulai proses pengeditan, sebaiknya anda mendownload (atau edit langsung lewat FTP Software) file tema MobilePress yang terletak di mobilepress/system/themes/ (folder tersebut terletak di wp-content/plugins). Didalamnya ada dua jenis tema yaitu default dan iphone, untuk hasil maksimal edit juga tema iphone-nya.

Memasang Script Dibawah Atau Diatas Setiap Artikel

Di file Single.php, Cari tag <?php the_content(); ?> itu adalah tag untuk isi artikel anda, jadi jika anda ingin memasang script di bawah artikel, letakkan dibawah tag tersebut, begitu juga sebaliknya.

Contoh:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php get_header(); ?>
 
        <div id="contentwap">
 
        <?php
            if (isset($_GET['comments'])) {
 
                if (have_posts()): while (have_posts()): the_post();
                    comments_template();
                endwhile; endif;
 
            }
            elseif (isset($_GET['postcomment'])) {
 
                if (have_posts()): while (have_posts()): the_post();
                    comments_template($file = '/postcomment.php');
                endwhile; endif;
 
            }
            else {
        ?>
 
            <?php if (have_posts()): while (have_posts()): the_post(); ?>
 
            <div id="infoblock">
 
                <h2><?php the_title(); ?></h2>
 
            </div>
 
            <div class="post">
                <?php the_content(); ?> // letakkan script dibawah atau diatas
 
                <?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>
 
                <blockquote><p>Jangan lupa untuk berlangganan <a href="http://feeds.feedburner.com/Lucksoft">rss feed</a> lucksoft.co.cc untuk mendapatkan update artikel terbaru saya atau anda bisa menggunakan email anda untuk mendapatkan update terbaru artikel saya melalui <a href="<a href="http://feedburner.google.com/fb/a/mailverify?uri=Lucksoft">link ini</a></p></blockquote>
 
                <?php akpc_the_popularity() ?><br><br>
 
                <A HREF="http://www.copyscape.com/original-content/"><IMG SRC="http://banners.copyscape.com/images/cs-ye-234x16.gif" ALT="Protected by Copyscape Original Content Checker" TITLE="Protected by Copyscape Plagiarism Checker - Do not copy content from this page." WIDTH="234" HEIGHT="16" BORDER="0"></A><br>
 
                <hr>
 
                <br><script src="http://kumpulblogger.com/scahor.php?b=xxxxxxx" type="text/javascript"></script><br>
 
                <br><h3><b>Artikel terkait:</b>
                <?php similar_posts(); ?>
 
                <br><h3><b>Artikel lainnya:</b>
                <?php rpl_random_lists(); ?>
 
                <?php if(function_exists('stt_terms_list')) echo stt_terms_list() ;?>
 
                <?php wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink=Page %'); ?>
            </div>

Memasang Script Diatas Footer (Diatas Link Komentar) Saat Di Dalam Artikel

Masih di file Single.php, letakkan script di atas tag <div id="postfoot">

Contoh:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<br><script src="http://kumpulblogger.com/scahor.php?b=xxxxxx" type="text/javascript"></script><br>
 
            <div id="postfoot"> // Letakkan script atas tag ini
                <p><?php the_time('j F Y') ?>. Ditulis di <?php the_category(', ') ?>.</p>
            </div>
 
            <div id="comments">
            <?php akismet_counter(); ?><br> // Jika anda mau letakkan Akismet Counter disini
                <div id="respond">
                    <p><a href="<?php the_permalink(); ?><?php mopr_check_permalink(); ?>comments=true">Lihat</a> atau <a href="<?php the_permalink() ?><?php mopr_check_permalink(); ?>postcomment=true">Tinggalkan</a> Komentar.</p>
                </div>
            </div>
 
            <?php endwhile; else: ?>

Memasang Script Diatas Dan Dibawah Hasil Pencarian

Lakukan di file Search.php.

Untuk memasang diatas hasil pencarian, cari tag <?php if (have_posts()) : while (have_posts()) : the_post(); ?> dan letakkan script diatas tag tersebut.

Sedangkan untuk memasang script dibawah hasil pencarian, script diletakkan dibawah tag <?php endif; ?>

Contoh:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script src="http://kumpulblogger.com/scahor.php?b=xxxx" type="text/javascript"></script><br> // Letakkan disini
 
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 
            <div class="post">
                <h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
                <p class="subtitle"><?php the_time('j F Y') ?>. <a href="<?php the_permalink() ?><?php mopr_check_permalink(); ?>comments=true"><?php comments_number('0 Komentar', '1 Komentar', '% Komentar' ); ?></a></p>
            </div>
 
            <?php endwhileelse: ?>
 
            <h2>Halaman Tidak Ditemukan</h2>
            <p>Maaf, Kami tidak dapat menemukan halaman yang Anda cari. Anda dapat mencoba mencari lagi dengan kata kunci lain atau menggunakan alat-alat navigasi di weblog ini.</p>
 
<br><script src="http://kumpulblogger.com/scahor.php?b=xxxxxx" type="text/javascript"></script><br> // Letakkan disini
 
            <?php endif; ?>

Memasang Script Dibawah Post Comment

Di file postcomment.php cari tag <div id="postfoot"> dan letakkan dibawahnya (Letakkan diantas tag <?php endif; ?> dan <div id="postfoot">).

Contoh:

1
2
3
4
5
6
7
<?php endif; ?>
 
            <br><script src="http://kumpulblogger.com/scahor.php?b=xxxxxx" type="text/javascript"></script><br> // Letakkan disini
 
            <div id="postfoot">
                <p><a href="<?php the_permalink() ?>">Kembali Ke Artikel</a></p>
            </div>

Memasang Script Dibawah Komentar

Lakukan di file Comments.php, Caranya sama saja dengan cara memasang script dibawah post comment.

Memasang Script Diatas Footer Saat Di Halaman Arsip

Di file archive.php, letakkan script di antara tag <?php endif; ?> dan <?php if (mopr_check_pagination()): ?>

Contoh:

1
2
3
4
5
6
7
8
9
10
11
<?php endif; ?>
 
            <br><script src="http://kumpulblogger.com/scahor.php?b=xxxxx" type="text/javascript"></script><br> // Letakkan disini
 
            <?php if (mopr_check_pagination()): ?>               
 
            <div id="postfoot">
                <p><?php posts_nav_link(' · ', 'Halaman Sebelumnya', 'Halaman Selanjutnya'); ?></p>
            </div>
 
            <?php endif; ?>

Memasang Script Dibawah Page Post (page.php)

Di file page.php, letakkan script dibawah tag <?php the_content(); ?>

Contoh:

1
2
3
4
5
6
7
8
9
<?php the_content(); ?>
                <hr>
                <br><script src="http://kumpulblogger.com/scahor.php?b=xxxxxx" type="text/javascript"></script><br> // letakkan disini
                <?php wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink=Page %'); ?>
            </div>
 
            <div id="postfoot">
                <p><?php the_time('j F Y') ?>.</p>
            </div>

Untuk memberi garis pembatas diantara script dan artikel gunakan tag <hr> jika ingin script sedikit kebawah (Enter) gunakan tag <br>.

Mungkin ini saja yang dapat saya ajarkan di artikel ini, karena memang ini saja yang saya lakukan di tema MobilePress saya icon biggrin Memasang Script Di Tema MobilePress .
Jika anda ingin meletakkan script ditempat yang tidak saya tulis diartikel ini, tanyakan saja dan nanti akan saya jawab semampu saya.

Sebagai bonus saya akan memberikan anda Tema MobilePress Bahasa Indonesia yang saya terjemahkan sendiri, Download disini.

Artikel Terkait



0 komentar:

Posting Komentar

Anda dapat menggunakan beberapa tag HTML, seperti <b>, <i>, <a>
Penting: Jika anda tidak memiliki account gmail pilih Name/URL pada form ini

Links Free Traffic And BackLink

 
Copyright © JHN-SOFT Poweredby Julka Hendri