Mais conteúdo relacionado
Semelhante a WordPress実践 導入からカスタマイズまで (20)
Mais de Takashi Uemura (20)
WordPress実践 導入からカスタマイズまで
- 2. 自己紹介
@uemera uemura
• 上村崇 ( うえむらたかし )
• フリーランスのシステムエンジニア
• サーバインフラ、組込みシステム、Web とか。
• IT 業界のキャリア 10 年ちょっと
• 兵庫県西宮市在住
- 3. 最近のオレ
XOO PS
勉強会準備
WordBench,
サーバ関係
PHPフレームワーク
FuelPHP、CodeIgniter
JavaScript
jQuery
WordPress
主に技術サポート さくらVPS(CentOS)、LAMP、
メールサーバ、git、samba、netatalk
サーバインフラ
- 7. 詳しくは過去の資料をご覧ください。
WordPressの天下はいつまで続く? WordPressの現状と未来
http://prezi.com/dnuvx7wirgee/wordpress-wordpress-web/
- 10. 客 制作者
自分で記事編集したいんだよね
CMSで作りましょう
でも安くないとヤダよ
( WordPressかなぁ... )
- 24. index.php
header.php
content.php
sidebar.php
content.php
footer.php
- 25. テーマフォルダに入っているファイル
content.php
記事コンテンツ用 footer.php
フッタ用
header.php
ヘッダ用
index.php
インデックスページ用
必要なファイルは限られている
スタイルシート
sidebar.php
サイドバー用
- 26. <?php
get_header();
?> header.php index.php
<div
id="primary">
<div
id="content"
role="main">
<?php
if
(
have_posts()
)
:
?>
<?php
twentyeleven_content_nav(
'nav-‐above'
);
?>
<?php
/*
Start
the
Loop
*/
?>
<?php
while
(
have_posts()
)
:
the_post();
?> content.php
<?php
get_template_part('content',
get_post_format());
?>
<?php
endwhile;
?>
テンプレートタグ という
<?php
twentyeleven_content_nav(
'nav-‐below'
);
?>
<?php
else
:
?>
WordPressが用意している関数
<article
id="post-‐0"
class="post
no-‐results
not-‐found">
<header
class="entry-‐header">
<h1
class="entry-‐title"><?php
_e(
'Nothing
Found',
'twentyeleven'
);
?></h1>
</header><!-‐-‐
.entry-‐header
-‐-‐>
<div
class="entry-‐content">
<p><?php
_e(
'Apologies,
but
no
results
were
found
for
the
requested
archive.
Perhaps
searching
will
help
find
a
related
post.'
<?php
get_search_form();
?>
</div><!-‐-‐
.entry-‐content
-‐-‐>
</article><!-‐-‐
#post-‐0
-‐-‐>
<?php
endif;
?>
</div><!-‐-‐
#content
-‐-‐>
</div><!-‐-‐
#primary
-‐-‐>
<?php
get_sidebar();
?> sidebar.php
<?php
get_footer();
?> footer.php
- 27. <?php
get_header();
?> index.php
<div
id="primary">
<div
id="content"
role="main">
テンプレートタグ
<?php
if
(
have_posts()
)
:
?>
<?php
twentyeleven_content_nav(
'nav-‐above'
);
?>
<?php
/*
Start
the
Loop
*/
?>
<?php
while
(
have_posts()
)
:
the_post();
?>
<?php
get_template_part('content',
get_post_format());
?>
1記事分を表示
<?php
endwhile;
?>
<?php
twentyeleven_content_nav(
'nav-‐below'
);
?>
<?php
else
:
?>
<article
id="post-‐0"
class="post
no-‐results
not-‐found">
<header
class="entry-‐header">
<h1
class="entry-‐title"><?php
_e(
'Nothing
Found',
'twentyeleven'
);
?></h1>
</header><!-‐-‐
.entry-‐header
-‐-‐>
<div
class="entry-‐content">
<p><?php
_e(
'Apologies,
but
no
results
were
found
for
the
requested
archive.
Perhaps
searching
will
help
find
a
related
post.'
<?php
get_search_form();
?>
</div><!-‐-‐
.entry-‐content
-‐-‐>
</article><!-‐-‐
#post-‐0
-‐-‐>
<?php
endif;
?>
</div><!-‐-‐
#content
-‐-‐>
</div><!-‐-‐
#primary
-‐-‐>
<?php
get_sidebar();
?>
<?php
get_footer();
?>
- 31. テンプレートファイルが適用されるルール
インデックスページ
(最新投稿順の一覧ページ)
index.php
優先
シングルページ
(1記事のみのページ) index.php single.php
優先 優先
カテゴリーごとページ
(カテゴリごとに分けたページ一覧) index.php archive.php category.php
優先 優先
日付ごとページ
(月毎に分けたページ一覧) index.php archive.php date.php
- 32. archive.php category.php
アーカイブページ用 カテゴリーページ用
(無くてもOK) (無くてもOK)
index.php
インデックスページ用
(必須)
single.php
シングルページ用
(無くてもOK)
- 35. 投 稿 ブログを投稿する
のに使う
固定ページ 静的ページを作るの
に使う
- 41. 大都会岡山
大都会岡山
(人が識別するための名前)
okayama
(URLとして使用される文字列)
Costom post type: カスタム投稿タイプのこと
スラグ: URLに使うためのページ固有の文字列のこと
画面の一番下にある「CustomPostTypeを保存」をクリックして保存する
- 42. 投 稿
固定 ペー ジ
大都会岡山のカスタム投稿タイプができた!
- 50. BackWPupプラグイン最強
・ファイルとDBの両方バックアップ
・バックアップファイルをFTP転送
・スケジュール実行できる
・実行結果をメール通知できる
・DropBox/AmazonS3/GoogleStorage/
MicrosoftAzure/Rackspace Cloud
にも転送可能
・リストアがブラウザからできる
・ただし英語
- 58. ロリポプラン
初期費用 1575円
月額 315円
3ステップでDB作成とファイル設置まで完了
- 60. イベントめじろ押し!
WordPress関連イベント一覧
WordBench東京、大阪などは
Ustream配信アリ
http://wordbench.org