/wp 以下に作成したWPサイトのトップページだけは独立したページを使用します。


↑のindex.htmlをトップに表示させます。

1) テンプレートファイル template_toppage.phpを作成します。
内容は以下の通り

<?php
/*
Template Name: Top Page
*/
readfile(ABSPATH . '/index.html');
?>

ABSPATHはwordpressがインストールされたフォルダのパスを示します。
ですのでindex.htmlがwp/フォルダ以下にあっても上記の指定でOKです。

2) WP管理画面から固定ページを新規に作成します。
タイトルは「トップページ」などてきとうでかまいません。

テンプレートに先ほど作成したTop Pageが表示されますのでこれを選択します。

3) 「設定」=> 「表示設定」=>「フロントページの表示」で「固定ページ」にチェックをし、先ほど作成したページを選択します。

コメント

  1. cialis online ordering より:

    Hello just wanted to give you a quick heads up. The text in your post seem to be
    running off the screen in Ie. I’m not sure if this is a formatting
    issue or something to do with browser compatibility but I
    thought I’d post to let you know. The style and design look great though!
    Hope you get the problem resolved soon. Cheers

タイトルとURLをコピーしました