Sekadar menyimpan catatan hasil “berguru” kepada para pakar desain dan programmer website, selama saya berkutat dengan urusan blog desain.
RELATED POST TANPA PLUGIN
<!– Related Post –>
<?php
$this_post = $post;
$category = get_the_category(); $category = $category[0]; $category = $category->cat_ID;
$posts = get_posts(‘numberposts=6&offset=0&orderby=post_dat e&order=DESC&category=’.$category);
$count = 0;
foreach ( $posts as $post ) {
if ( $post->ID == $this_post->ID || $count == 5) {
unset($posts[$count]);
}else{
$count ++;
}
}
?>
<?php if ( $posts ) : ?>
<div><h3><left>TULISAN LAINNYA</left></h3><ul><?php foreach ( $posts as $post ) : ?>
<li><a href=”<?php the_permalink() ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a></li><?php endforeach // $posts as $post ?></ul></div>
<?php endif // $posts ?>
<?php
$post = $this_post;
unset($this_post);
?>
<!– End Related Post –>
Mengatasi ‘Cheatin’ uh?’ WordPress
1. Buka file wp-admin/media-upload.php
2. Cari kode wp_die( __( ‘Cheatin’ uh?’ ) ); (baris 126)
3. Beri dua garis miring ( // ) sebelum kode tersebut di atas: //wp_die( __( ‘Cheatin’ uh?’ ) );
4. Save!
POSTED BY, CATEGORY, VIEWS, PRINT:
<span><?php echo get_the_date(”) ?> | <?php _e(‘Posted by’,'romeltea’); ?>: <?php the_author_posts_link(); ?> | <?php if(function_exists(‘the_views’)) { the_views(); } ?> | <?php if(function_exists(‘wp_print’)) { print_link(); } ?></span>
* Install dulu plugin WP PostView dan WP Print
SHARE FACEBOOK BOTTON:
<a title=’Share on Facebook’ name=’fb_share’ type=’button_count’ href=’http://www.facebook.com/sharer.php’>Share</a><script src=’http://static.ak.fbcdn.net/connect.php/js/FB.Share’ type=’text/javascript’></script>
KODE GARIS
<div style=”border-bottom:2px solid #ccc;”></div>
<div style=”border-bottom:2px dotted #ccc;”></div>
KOLOM KOMENTAR DI PAGE:
<?php comments_template(); ?>
(di atas: <?php endwhile; else: ?>)
(di bawah: <?php endwhile; endif; ?>)
(setelah: <?php the_content(); ?>)
LINK E-MAIL:
<a href=â”mailto:email@email.com?subject=Feedback”>mailto:email@email.com</a>
PASANG GAMBAR:
<img src=”http://namadomain.com/namaimage” border=”0″ height=”60″ width=”468″>
EFEK HURUF
<b>Tebal</b>/<strong>Tebal</strong>
<i>Miring</i>
<u>Garis Bawah</u>
WARNA TEKS
<font color=”#000000″>Hitam</font>
<font color=”white”>Putih</font>
* Kode warna Di Sini.
UKURAN HURUF:
<p> <font size=”5″>Huruf/Tulisan</font> </p>
POSISI TEKS/GAMBAR:
<center>Tengah</center>
<left>Kiri</left>
<right>Kanan</right>
BARIS BARU:
<p>Alinea baru</p>
<br/>
<br>Alinea baru</nr>
BULLET & NUMBERING:
<li> -> Bullet
<ol> -> Number
EDIT POST:
<?php edit_post_link(‘Edit’, ‘[ ', ' ]‘); ?>
TULIS KOMENTAR:
<?php comments_popup_link(‘Tulis Komentar’, ’1 Komentar’,
‘% Comments’, ‘comments-link’, ‘Comments Off’); ?>
LATEST POSTING
<div style=”-moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; background-color: #9ACD32; border: 1px solid rgb(204, 204, 204); height: 120px; margin: 10px 0px; overflow: auto; padding: 10px; text-align: left; width: auto;”>
<font color=”yellow”><b>LATEST POSTING :</b></font>
<ul>
<b><li><p><?php mdv_recent_posts(); ?></p></li></b>
</ul>
<br />
</div>
* Plugin: Recent Posts
TETAP UPDATE:
<p><i><font color=”green”>Tetap update berita/artikel di mana pun dari Romeltea Magazine dengan mengetikkan <strong>http://romeltea.com</strong> dari browser ponsel Anda!</font></i></p>
Tetap update berita/artikel di mana pun dari Romeltea Magazine dengan mengetikkan http://romeltea.com dari browser ponsel Anda!
SEMBUNYIKAN VERSI WORDPRESS
remove_action (‘wp_head’, ‘wp_generator’);
* simpan di file functions.php pada theme yang digunakan, dalam atau setelag tag <?php
Fatal Error Allowed Memory Size
Mengatasi “Fatal Error Allowed Memory Size of ….. byte exhausted”, misalnya “Fatal error: Allowed memory size of 33554432 ” dengan langkah berikut:
- Buka Notepad, lalu tuliskan: memory_limit 64000000
- Save dan filenya beri nama: php.ini
- Buka Cpanel dan upload file php.ini itu ke folder “public_html” dan jika perlu juga ke folder “wp-admin”.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 15552 bytes)
SOLUSI:
- If you have access to your PHP.ini file, change the line in PHP.ini
If your line shows 32M try 64M:
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB) - If you don’t have access to PHP.ini try adding this to an .htaccess file:
php_value memory_limit 128M - 3Try adding this line to your wp-config.php file:
Increasing memory allocated to PHP
define(‘WP_MEMORY_LIMIT’, ’128M’); - Talk to your host.
Ganti tampilan Halaman Login/Register di WordPress:
- Masuk ke Cpanel
- Buka folder wp-admin
- Buka folder image
- Replace image logo-login.gif (WP versi terbaru nama filenya wordpress-logo.png) dengan image versi kita, misalnya gambar logo dengan nama file dan ukuran yang sama.
Setting/Desain Web dengan CMS Worpress:
- Masuk Cpanel
- Buat Database plus Username & Password di MySQL Database
- Install WordPress (pilihan): (a) Masuk FTP sever dan copykan WP. (b) Masuk ke File Manager dan copykan WP ke root/public html. (c) Jika ada fasilitas Fantastico Autoinstaller, tinggal pilih aplikasi WP.
- Buka file WP di Cpanel/FTP dan rename file wp-config.sample.php menjadi wp-config.php dan isi DB Name, DB User, DB Password, dst.
- Buka browser dan ketikkan www.namadomain/install.php
- Isi Username & Password buat Login ke WP-Admin/Site Admin.
- Selesai.
Akses wp-login.php/wp-admin WordPress dashboard blank/Mengatasi Wp-Admin Blank Putih:
- Ada spasi di function.php di wp-theme >hapus!
- Ada spasi di wp-config.php bagian bawah >hapus!
- Pluginnya bermasalah >update or deactivate!/delete!
- Wah…. temanya gak cocok kali> ganti deh! ^_^
PASANG IKLAN DI TENGAH POSTING
Pasang di single.php, ganti <?php the_content( ); ?> dengan:
<?php
$where = 5;
$content = apply_filters(‘the_content’, get_the_content());
$content = explode(“</p>”, $content);
for ($i = 0; $i <count($content); $i++) {
if ($i == $where) { ?>
<div style=”float:left; margin:0 10px 10px 0;”>
<!-KODE IKLAN DI SINI!->
</div>
<?php
}
echo $content[$i] . “</p>”;
}
?>
* Angka 5 = iklan muncul setelah paragraf ke-5, bisa diganti dengan angka 1, 2, dst. Alternatif: Pasang Plugin Quick Adsense seperti yang saya gunakan.
KOTAK BERWARNA
<div style=”border: 1px #0000 solid; padding: 10px; background-color: #ccc; text-align: left;”> Tulisan dalam Kotak Berlatarbelakang Warna</div>
CONTOH:
Tulisan dalam Kotak Berlatar Belakang Warna
Menampilkan Deskripsi Kategori di WordPress
Tambahkan <?php echo category_description(); ?> di file archive.php di atas perintah while loop.
Posting Dua Kolom
<table cellpadding=”10″ cellspacing=”10″><tbody><tr> <td align=”justify” valign=”top” width=”260″>Teks Kolom Kiri</td><td align=”justify” valign=”top” width=”260″>Teks Kolom Kanan</td> </tr></tbody></table>
Decrypt WordPress PHP Footer
Bagi kode yang mengandung huruf dan kata: $o=whatever:
http://ottodestruct.com/decoder.php
Bagi kode encrypsi yang dimulai dengan: $_F=__FILE__:
http://www.tareeinternet.com/scripts/byterun.phpBagi kode yang tampak begini: eval(gzinflate(base64_decode(‘…’)));:
http://www.tareeinternet.com/scripts/decrypt.phpMUNCULKAN KOLOM KOMENTAR DI PROTECTED PAGE
Ganti di comments.php:
if (!empty($post->post_password)) { // if there’s a password
dengan:
if ( post_password_required() ) { ?> <p>This post is password protected. Enter the password to view comments.</p> <?php return; }
ATAU
<?php // Do not delete these lines
if (‘comments.php’ == basename($_SERVER['SCRIPT_FILENAME']))
die (‘Please do not load this page directly. Thanks!’);
if (!empty($post->post_password)) { // if there’s a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn’t match the cookie?>
<?php
return;
}
}
?>
ganti dengan:
<?php // Do not delete these lines if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!'); if ( post_password_required() ) { ?> <p>Please enter password to view comments</p> <?php return; } ?>




ok.. makasih boss….. atas informasinya…..
u R welcome… ^_^