wordbench福井 第2回勉強会 発表スライド - wordpress 3.0...

Post on 24-May-2015

2.040 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

2010年9月25日に開かれたWordBench福井の第2回勉強会で発表しました。

TRANSCRIPT

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

WordPress 3.0 でできるあんなコト、こんなコト。

カウベル・コーポレーション 森川徹志

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \今日の流れ

● WordPressって何?

● WordPress 3.0の注目点

● 新デフォルトテーマ『Twenty Ten』の特徴

● ヘッダ画像・背景画像・アイキャッチ画像

● カスタムメニュー

● 子テーマによるカスタマイズ

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \WordPressって何?

● PHP+MySQL

● ブログ/CMSツール・ブログサービス

● GPL v2

● 投稿+ページ

● テーマ多数(公式:1,239個)

プラグイン多数(公式:11,348個)

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

2010.6.17 - WP3.02010.6.17 - WP3.0リリースリリース

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \WordPress 3.0の注目点

● 新デフォルトテーマ『Twenty Ten』

● カスタムメニュー

● 投稿/ページ + カスタム投稿タイプ

● 複数サイトの一括管理

……などなど1,217件のバグ修正と機能強化

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

新デフォルトテーマ『新デフォルトテーマ『Twenty TenTwenty Ten』』

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \『Twenty Ten』の特徴

● ヘッダ・背景・アイキャッチ画像 容易に変更可

● カスタムメニュー対応

➔ 自分流のナビゲーションメニューを作成可

● テーマフレームワークとしての活用

➔ 『Twenty Ten』をベースにテーマを設計

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

ヘッダ・背景・アイキャッチ画像

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

投稿投稿//ページ ごとにヘッダ画像を変更可能ページ ごとにヘッダ画像を変更可能

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

カスタムメニュー

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

投稿投稿//ページ の混在したメニューを作成可能ページ の混在したメニューを作成可能

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

デザイナー やることないじゃん?デザイナー やることないじゃん?

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

テーマフレームワークとしての活用

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \テーマフレームワークの考え方

● 『Twenty Ten』をベース(=親)にして制作

● 親テーマとの差分を「子」として設計

● 必要に応じてテンプレートをオーバーライド

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \テーマフレームワークの利点

● 親テーマが更新されても影響を受けない

● カスタムメニューやウィジェットが流用可

● 基本的にはstyle.cssの作成だけでOK

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

BEFOREBEFORE

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

AFTERAFTER

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \子テーマの基本的な作り方

INSTALL_DIR

wp-content

themes

twentyten

index.php, style.css...

child(ディレクトリ名は任意)

style.css(必須)

index.php, header.php, single.php...(任意)

functions.php(任意)

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \子テーマの基本的な作り方

/*Theme Name: ChildTheme URI: http://example.com/Description: Child theme for the Twenty Ten themeAuthor: Author's nameAuthor URI: http://example.com/about/Template: twentytenVersion: 0.1.0*/

@import url(../twentyten/style.css);

#container p { color: #333333; }

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

One More Thing...One More Thing...

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

カスタム投稿タイプ

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \カスタム投稿タイプとは?

投稿/ページに加わる 新たなデータ形式

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

投稿

投稿カスタム投稿タイプ

ページ

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \カスタム投稿タイプの設置

● 方法は2通り

a)functions.phpで定義

b)『Custom Post Type UI』プラグイン利用

● new WP_Query()で呼び出す

$args = array('post_type' => 'hoge', 'posts_per_page' => 5

);

$the_query = new WP_Query( $args );

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \関連サイト

● WordPress 日本語ローカルサイト

http://ja.wordpress.org/

● WordPress Codex 日本語版

(子テーマ, カスタム投稿タイプの解説)

http://wpdocs.sourceforge.jp/

● Custom Post Type UI

(カスタム投稿タイプ設定プラグイン)

http://wordpress.org/extend/plugins/custom-post-

type-ui/

Copyright 2010 COWBELL Corporation.Some rights reserved

meets \

Have fun!Have fun!tets@cowbell.jp / @teckingtets@cowbell.jp / @tecking

copyrightcopyrightPooWho CC BY 2.0 Generic–PooWho CC BY 2.0 Generic–acaben CC BY-SA 2.0 Generic–acaben CC BY-SA 2.0 Generic–

top related