[php]
<?php
//トップページ以外の場合にnot_homeクラスを追加
$body_class = "";
if ( !is_front_page() ) {
$body_class .= ' not_home';
}
?>
<body id="top" <?php body_class( $body_c…
なんともない話題ではありますが、既存のサイトを公開したまま、index.phpの方で、WordPressを入れて、リニューアルをと思ってたんですが、index.phpもindex.htmlもWordPressのホームディレクトリにリダイレクトされてるようです。
どうしたもんかと思ってたら、簡単に解決する方法がありました。
wp-include内のcanonical.phpファイルを開き、270行目付近にある、以下の一文をコメントアウトするだけです。
$redirect['path'] = preg_replace('|/index.php/*?$|', '/', $redirect['path']);
この投稿へのコメント
コメントはまだありません。