logo

WordPress giriş sayfasını index.html yapma

logo

1. Öncelikle wp-includes/canonical.php dosyasını bir metin editörü yardımıyla açıyoruz.

2. Daha sonra 60.satıra gidiyoruz. Satır ilerlemesi yapamıyorsanız. Şu satır bloğunu arayın:

// Some PHP setups turn requests for / into /index.php in REQUEST_URI
// See: http://trac.wordpress.org/ticket/5017
// See: http://trac.wordpress.org/ticket/7173
// Disabled, for now:
// $original['path'] = preg_replace(‘|/index\.php$|’, ‘/’, $original['path']);

3. Bu satır bloğunda en alt satırdaki not işaretini kaldırın… Yani şu hale gelecek o bölüm:

// Some PHP setups turn requests for / into /index.php in REQUEST_URI
// See: http://trac.wordpress.org/ticket/5017
// See: http://trac.wordpress.org/ticket/7173
// Disabled, for now:
$original['path'] = preg_replace(‘|/index\.php$|’, ‘/’, $original['path']);

4. Şimdi de yine aynı dosya içerisinde 213.satıra gidin yada şu kodu aratın:
// trailing /index.php
$redirect['path'] = preg_replace(‘|/index.php/*?$|’, ‘/’, $redirect['path']);

5. Bu kodu da aşağıdaki şekilde değiştirin:
// trailing /index.php
$redirect['path'] = preg_replace(‘|/index.php/$|’, ‘/’, $redirect['path']);

ARAMA ÇUBUGU İÇİN GEREKLİ İŞLEMLER BUNU YAPMAZSANIZ SİTE İÇİ ARAMA YAPAMAZSINIZ.

Örnek arama formunuz normalde şu şekilde olur:

<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
<div>
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>

Siz bunu şu şekilde değiştirirseniz:

<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/index.php">
<div>
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
Bu Yazıyı Paylaş:
  • Digg
  • Facebook

Leave a Reply

logo
logo
Küçükaydın