Wadah Sharing Ilmu dan Pengalaman
Masalah Template WP Mystique dan qTranslate
Template wordpress Mystique (seperti blog ini), memiliki masalah dengan plugin qTranslate. Masalah yang timbul adalah kacaunya tampilan dari template tersebut. Hal ini disebabkan karena bentroknya kode Mytique dengan kode qTranslate, sehingga Mystique tidak dapat menemukan lokasi file CSS nya dengan benar. Saya dapat mengatasi masalah ini dengan beberapa langkah mudah yang saya temukan di forum WordPress. Berikut langkah-langkahnya.
- Masuk ke submenu Editor di menu Appearance.
- Pilih Core.php
- Cari function mystique_curPageURL() yang berisi
1
2
3
4
5
6
7
8
9
10
11
12
13 function mystique_curPageURL() {
$request = esc_url($_SERVER["REQUEST_URI"]);
// wp-themes fake request url fix
if (strpos($_SERVER["SERVER_NAME"], 'wp-themes.com') !== false) $request = str_replace($request, '/wordpress/', '/');
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") $pageURL .= "s";
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$request; else $pageURL .= $_SERVER["SERVER_NAME"].$request;
return $pageURL;
}
- Ubah kode tersebut menjadi:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 function mystique_curPageURL() {
$request = esc_url($_SERVER["REQUEST_URI"]);
// wp-themes fake request url fix
if (strpos($_SERVER["SERVER_NAME"], 'wp-themes.com') !== false) $request = str_replace($request, '/wordpress/', '/');
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") $pageURL .= "s";
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$request;
elseif(strpos($request, "http://")!==false || strpos($request, "https://") !== false ) $pageURL=$request;
else $pageURL .= $_SERVER["SERVER_NAME"].$request;
return $pageURL;
}
- Simpan.
- Bila proses penyimpanan gagal, ubah file permission core.php dari cPanel anda.
Selamat mencoba! :D
| Print article | This entry was posted by Nanda Firdaus on November 2, 2010 at 12:58 , and is filed under Tips n trick. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

