Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
EN
Uploaded by
Takashi Uemura
PPTX, PDF
4,502 views
20100116 01 Word Pressテンプレートのカスタマイズ&Xml出力
AI-enhanced description
本文件介绍了WordPress主题的定制方法及XML文件的输出。文档主要讨论了WordPress的基本结构,包括PHP代码的使用和模板标签的应用。它还详细描述了如何实现主题的自定义和内容管理。
Technology
◦
Read more
5
Save
Share
Embed
Embed presentation
Download
Downloaded 18 times
1
/ 90
2
/ 90
3
/ 90
4
/ 90
5
/ 90
6
/ 90
7
/ 90
8
/ 90
9
/ 90
10
/ 90
11
/ 90
12
/ 90
13
/ 90
14
/ 90
15
/ 90
16
/ 90
17
/ 90
18
/ 90
19
/ 90
20
/ 90
21
/ 90
22
/ 90
23
/ 90
24
/ 90
25
/ 90
26
/ 90
27
/ 90
28
/ 90
29
/ 90
30
/ 90
31
/ 90
32
/ 90
33
/ 90
34
/ 90
35
/ 90
36
/ 90
37
/ 90
38
/ 90
39
/ 90
40
/ 90
41
/ 90
42
/ 90
43
/ 90
44
/ 90
45
/ 90
46
/ 90
47
/ 90
48
/ 90
49
/ 90
50
/ 90
51
/ 90
52
/ 90
53
/ 90
54
/ 90
55
/ 90
56
/ 90
57
/ 90
58
/ 90
59
/ 90
60
/ 90
61
/ 90
62
/ 90
63
/ 90
64
/ 90
65
/ 90
66
/ 90
67
/ 90
68
/ 90
69
/ 90
70
/ 90
71
/ 90
72
/ 90
73
/ 90
74
/ 90
75
/ 90
76
/ 90
77
/ 90
78
/ 90
79
/ 90
80
/ 90
81
/ 90
82
/ 90
83
/ 90
84
/ 90
85
/ 90
86
/ 90
87
/ 90
88
/ 90
89
/ 90
90
/ 90
More Related Content
PDF
史上最经典的Word press 主题教程
by
chenronglin
PPTX
Retención a la fuente
by
pokjontas
PPTX
Retención a la fuente
by
pokjontas
PDF
Manual de office pdf lopez de la cruz
by
josuedlacruz
PPT
Retención en la fuente 1
by
DIEGORINCON22
DOCX
Waardig Organiseren Artikel
by
Albert Jan Stam
PDF
Proyecto formativo
by
jhonfospino
PDF
Proyecto formativo
by
samy meza alvarez
史上最经典的Word press 主题教程
by
chenronglin
Retención a la fuente
by
pokjontas
Retención a la fuente
by
pokjontas
Manual de office pdf lopez de la cruz
by
josuedlacruz
Retención en la fuente 1
by
DIEGORINCON22
Waardig Organiseren Artikel
by
Albert Jan Stam
Proyecto formativo
by
jhonfospino
Proyecto formativo
by
samy meza alvarez
Viewers also liked
KEY
The future of social media
by
Andrew Nicholson
PPT
Módulo 5
by
JORGE AMERICO PALACIOS PALACIOS
PPTX
Sist. gestión de calidad
by
Ronald Paul Torrejon Infante
PPTX
Sims 2 100 Baby Challenge
by
guestc83ec0
PPT
Unidad i y ii
by
Arturo Muñoz
PDF
http://ainsamadi.blogspot.com/2013/03/panduan-pelaksanaan-dan-modul-program m...
by
Noor Aini Samsusah
PDF
61509468 codigo-de-etica-del-psicologo
by
Brenda Ortíz
PPTX
Retención en la fuente
by
santatis
PDF
Curso Gestión de Procesos FEB.2014 - Dr. Miguel Aguilar Serrano
by
Miguel Aguilar
PDF
Cápsula 1. estudios de mercado
by
Audias Torres Coronel
PPTX
C:\Fakepath\Christie
by
Nerissaemerald
PDF
Estrategias competitivas básicas
by
LarryJimenez
PDF
Study: The Future of VR, AR and Self-Driving Cars
by
LinkedIn
PDF
Hype vs. Reality: The AI Explainer
by
Luminary Labs
The future of social media
by
Andrew Nicholson
Módulo 5
by
JORGE AMERICO PALACIOS PALACIOS
Sist. gestión de calidad
by
Ronald Paul Torrejon Infante
Sims 2 100 Baby Challenge
by
guestc83ec0
Unidad i y ii
by
Arturo Muñoz
http://ainsamadi.blogspot.com/2013/03/panduan-pelaksanaan-dan-modul-program m...
by
Noor Aini Samsusah
61509468 codigo-de-etica-del-psicologo
by
Brenda Ortíz
Retención en la fuente
by
santatis
Curso Gestión de Procesos FEB.2014 - Dr. Miguel Aguilar Serrano
by
Miguel Aguilar
Cápsula 1. estudios de mercado
by
Audias Torres Coronel
C:\Fakepath\Christie
by
Nerissaemerald
Estrategias competitivas básicas
by
LarryJimenez
Study: The Future of VR, AR and Self-Driving Cars
by
LinkedIn
Hype vs. Reality: The AI Explainer
by
Luminary Labs
More from Takashi Uemura
PDF
WordPressを10年以上触ってきたオレがこのへんでひとこと言っておくか
by
Takashi Uemura
PDF
さくらのナレッジ5周年ナイトLT
by
Takashi Uemura
PDF
WAFって言いたいだけちゃうんか
by
Takashi Uemura
PDF
アイドル画像ギャラリーサイトを作ったあとどうなったか
by
Takashi Uemura
PDF
WordPressのテンプレートをカスタマイズするために必要なphpを初歩から解説
by
Takashi Uemura
PDF
神戸のアイドルKOBerrieS♪の画像ギャラリーサイトを作った話
by
Takashi Uemura
PDF
WordPressの常識をくつがえす超簡単テーマ doshirouto2014 を作ったのでこれでテーマを理解しよう!
by
Takashi Uemura
PDF
WordPressでオリジナルサイトを作るための最初の一歩的なカスタマイズテクニック
by
Takashi Uemura
PDF
WordPressの常識をくつがえす超簡単テーマ doshirouto2014 を作ったのでこれでテーマを理解しよう!
by
Takashi Uemura
PDF
20140214 さくらインターネットハンズオン@大阪 WordPressを始めよう
by
Takashi Uemura
PDF
WordPressの使えるプラグイン2013
by
Takashi Uemura
PDF
WordPress 多言語化プラグインqTranslateの紹介
by
Takashi Uemura
PDF
WordPressテーマ Foundation for WordPress の紹介
by
Takashi Uemura
PDF
What's new! TwentyThirteen + WordPress3.6
by
Takashi Uemura
PDF
WordPressの常識をくつがえす超簡単テーマ"doshirouto"を作ったのでこれでテーマを理解しよう!
by
Takashi Uemura
PDF
もしWordPressユーザーがGitを使ったら 〜WordPressテーマを共同編集しよう〜
by
Takashi Uemura
PDF
WordPress初心者からの脱出! カスタムなんとかをちゃんと理解する
by
Takashi Uemura
PDF
20121124 学生セミナー「基礎からわかる! IT業界とプログラミング」
by
Takashi Uemura
PDF
WordCampOsaka2012 闇WordCamp XOOPS編
by
Takashi Uemura
PDF
WordCampOsaka2012 WordPressあるある
by
Takashi Uemura
WordPressを10年以上触ってきたオレがこのへんでひとこと言っておくか
by
Takashi Uemura
さくらのナレッジ5周年ナイトLT
by
Takashi Uemura
WAFって言いたいだけちゃうんか
by
Takashi Uemura
アイドル画像ギャラリーサイトを作ったあとどうなったか
by
Takashi Uemura
WordPressのテンプレートをカスタマイズするために必要なphpを初歩から解説
by
Takashi Uemura
神戸のアイドルKOBerrieS♪の画像ギャラリーサイトを作った話
by
Takashi Uemura
WordPressの常識をくつがえす超簡単テーマ doshirouto2014 を作ったのでこれでテーマを理解しよう!
by
Takashi Uemura
WordPressでオリジナルサイトを作るための最初の一歩的なカスタマイズテクニック
by
Takashi Uemura
WordPressの常識をくつがえす超簡単テーマ doshirouto2014 を作ったのでこれでテーマを理解しよう!
by
Takashi Uemura
20140214 さくらインターネットハンズオン@大阪 WordPressを始めよう
by
Takashi Uemura
WordPressの使えるプラグイン2013
by
Takashi Uemura
WordPress 多言語化プラグインqTranslateの紹介
by
Takashi Uemura
WordPressテーマ Foundation for WordPress の紹介
by
Takashi Uemura
What's new! TwentyThirteen + WordPress3.6
by
Takashi Uemura
WordPressの常識をくつがえす超簡単テーマ"doshirouto"を作ったのでこれでテーマを理解しよう!
by
Takashi Uemura
もしWordPressユーザーがGitを使ったら 〜WordPressテーマを共同編集しよう〜
by
Takashi Uemura
WordPress初心者からの脱出! カスタムなんとかをちゃんと理解する
by
Takashi Uemura
20121124 学生セミナー「基礎からわかる! IT業界とプログラミング」
by
Takashi Uemura
WordCampOsaka2012 闇WordCamp XOOPS編
by
Takashi Uemura
WordCampOsaka2012 WordPressあるある
by
Takashi Uemura
20100116 01 Word Pressテンプレートのカスタマイズ&Xml出力
1.
WordPressテーマカスタマイズ&XML出力2010/1/16フリーランスシステムエンジニア上村 崇
2.
はじめに
3.
このプレゼンは後で公開しますので書き写す必要はありません
4.
質問は随時、挙手で
5.
それでは本題
6.
まずはじめに、WordPressのテーマをカスタマイズする方法についてつぎに、XMLファイルを出力する方法について
8.
WordPressとは
9.
ブログツールの一つ
10.
PHPで作られています
11.
MySQLを使っています
12.
創始者Matt Mullenweg氏26歳
13.
ブログツール比較日本全世界
14.
CMS比較日本全世界
15.
WordPressが2009年のベストCMS賞を獲得
16.
テーマについて
17.
テーマは無数にあります
25.
テーマをカスタマイズしましょう!
26.
もちろんHTMLスタイルシートの知識は必要ですが
27.
WordPressディレクトリ構成PHPテンプレートテンプレートタグ
28.
WordPressディレクトリ構成
29.
themesclassic初期状態でテーマは2つ
30.
themesdefaultとりあえずテーマファイルの置き場所だけ知っていればいいです
31.
PHPの基本
32.
まず、普通のHTMLファイルはこんなのです。
33.
index.html<html> <head><title>文書のタイトル</title></head><body>
文書の本文</body> </html>
34.
同じことをPHPでやると、こうなります。
35.
index.php<?phpecho "<html>";echo "
<head>";echo " <title>文書のタイトル</title>";echo " </head>";echo " <body>";echo "文書の本文";echo " </body>";echo "</html>";?>
36.
別の方法もあります。
37.
index.php<?php
$title = "文書のタイトル"; $contents = "文書の本文";?><html> <head> <title><?phpecho $title ?></title> </head> <body> <?phpecho $contents ?> </body> </html>
38.
つまり、PHPを書くときは<?php ?>
で囲む
39.
テンプレートとテンプレートタグ
40.
ブロックに分けて考えてみます
41.
headermaincontentssidebarfooter
42.
コードで表すとこうなります->
43.
index.php<?phpget_header();?> <?phpif ( have_posts()
) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>
44.
index.php<?phpget_header();?> <?phpif ( have_posts()
) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>WordPressループ(Main Contents)
45.
index.php<?phpget_header();?> <?phpif ( have_posts()
) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>headermaincontentssidebarfooter
46.
index.php<?phpget_header();?> <?phpif ( have_posts()
) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>headermaincontentssidebarfooter
47.
index.php<?phpget_header();?> <?phpif ( have_posts()
) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>headermaincontentssidebarfooter
48.
index.php<?phpget_header();?> <?phpif ( have_posts()
) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>headermaincontentssidebarfooter
49.
index.php<?phpget_header();?> <?phpif ( have_posts()
) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>テンプレートタグWordPress組込の関数
50.
index.phpheader.php<?phpget_header();?> <?phpif ( have_posts()
) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>sidebar.phpfooter.php
51.
defaultテンプレート
52.
Headerについて詳しく見てみます。
53.
header
54.
header.php<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" <?phplanguage_attributes(); ?>><head><meta http-equiv="Content-Type" content="<?phpbloginfo('html_type'); ?>; charset=<?phpbloginfo('charset'); ?>" /><title> <?phpwp_title('«', true, 'right'); ?> <?phpbloginfo('name'); ?></title><link rel="stylesheet" href="<?phpbloginfo('stylesheet_url'); ?>" type="text/css” /><style type="text/css”> #page { background: url("<?phpbloginfo('stylesheet_directory'); ?>/images/kubrickbg-ltr.jpg“) }</style><?phpwp_head(); ?></head><body><div id="page"><div id="header" role="banner"><div id="headerimg"><h1><a href="<?php echo get_option('home'); ?>/"><?phpbloginfo('name'); ?></a></h1><div class="description"><?phpbloginfo('description'); ?></div></div></div>
55.
header.php<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" <?phplanguage_attributes(); ?>><head><meta http-equiv="Content-Type" content="<?phpbloginfo('html_type'); ?>; charset=<?phpbloginfo('charset'); ?>" /><title> <?phpwp_title('«', true, 'right'); ?> <?phpbloginfo('name'); ?></title><link rel="stylesheet" href="<?phpbloginfo('stylesheet_url'); ?>" type="text/css” /><style type="text/css”> #page { background: url("<?phpbloginfo('stylesheet_directory'); ?>/images/kubrickbg-ltr.jpg“) }</style><?phpwp_head(); ?></head><body><div id="page"><div id="header" role="banner"><div id="headerimg"><h1><a href="<?php echo get_option('home'); ?>/"><?phpbloginfo('name'); ?></a></h1><div class="description"><?phpbloginfo('description'); ?></div></div></div>URLタイトルサイトの説明
56.
URLタイトルサイトの説明
57.
header.php<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" <?phplanguage_attributes(); ?>><head><meta http-equiv="Content-Type" content="<?phpbloginfo('html_type'); ?>; charset=<?phpbloginfo('charset'); ?>" /><title> <?phpwp_title('«', true, 'right'); ?> <?phpbloginfo('name'); ?></title><link rel="stylesheet" href="<?phpbloginfo('stylesheet_url'); ?>" type="text/css” /><style type="text/css”> #page { background: url("<?phpbloginfo('stylesheet_directory'); ?>/images/kubrickbg-ltr.jpg“) }</style><?phpwp_head(); ?></head><body><div id="page"><div id="header" role="banner"><div id="headerimg"><h1><a href="<?php echo get_option('home'); ?>/"><?phpbloginfo('name'); ?></a></h1><div class="description"><?phpbloginfo('description'); ?></div></div></div>
58.
header.php<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" <?phplanguage_attributes(); ?>><head><meta http-equiv="Content-Type" content="<?phpbloginfo('html_type'); ?>; charset=<?phpbloginfo('charset'); ?>" /><title> <?phpwp_title('«', true, 'right'); ?> <?phpbloginfo('name'); ?></title><link rel="stylesheet" href="<?phpbloginfo('stylesheet_url'); ?>" type="text/css” /><style type="text/css”> #page { background: url("<?phpbloginfo('stylesheet_directory'); ?>/images/kubrickbg-ltr.jpg“) }</style><?phpwp_head(); ?></head><body><div id="page"><div id="header" role="banner"><div id="headerimg"><h1><a href="<?php echo get_option('home'); ?>/"><?phpbloginfo('name'); ?></a></h1><div class="description"><?phpbloginfo('description'); ?></div></div></div>ドキュメントの場所は?
59.
wordpresscodex検 索
60.
次に、WordPressループの説明
61.
index.phpWordPressループ(Main Contents)<?phpget_header();?> <?phpif (
have_posts() ) : ?><?phpwhile (have_posts()) : the_post(); ?><?phpendwhile;?> <?phpelse :?> <?phpendif; ?><?phpget_sidebar(); ?><?phpget_footer();?>headermaincontentssidebarfooter
62.
繰り返し記事タイトル日付本文カテゴリ、コメント
63.
WordPressループ<?phpif (have_posts()) :
?><?phpwhile (have_posts()) : the_post(); ?><div <?phppost_class(); ?> id="post-<?phpthe_ID(); ?>"><h2><a href="<?phpthe_permalink()?>“ ><?phpthe_title(); ?></a></h2><small><?phpthe_time(__('F jS, Y', 'kubrick'))?></small><div class="entry"><?phpthe_content(__('Read the rest of this entry »', 'kubrick')); ?></div><p class="postmetadata"><?phpprintf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?phpedit_post_link(__('Edit', 'kubrick'), '', ' | '); ?> <?phpcomments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '',__('Comments Closed', 'kubrick') ); ?></p></div><?phpendwhile; ?><?phpelse : ?><h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2><p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p><?phpget_search_form(); ?><?phpendif; ?>
64.
<?phpif (have_posts()) :
?><?phpwhile (have_posts()) : the_post(); ?><div <?phppost_class(); ?> id="post-<?phpthe_ID(); ?>"><h2><a href="<?phpthe_permalink()?>“ ><?phpthe_title(); ?></a></h2><small><?phpthe_time(__('F jS, Y', 'kubrick'))?></small><div class="entry"><?phpthe_content(__('Read the rest of this entry »', 'kubrick')); ?></div><p class="postmetadata"><?phpprintf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?phpedit_post_link(__('Edit', 'kubrick'), '', ' | '); ?> <?phpcomments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '',__('Comments Closed', 'kubrick') ); ?></p></div><?phpendwhile; ?><?phpelse : ?><h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2><p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p><?phpget_search_form(); ?><?phpendif; ?>投稿があればtrue、なければfalse投稿がある場合の処理投稿がない場合の処理
65.
<?phpif (have_posts()) :
?><?phpwhile (have_posts()) : the_post(); ?><div <?phppost_class(); ?> id="post-<?phpthe_ID(); ?>"><h2><a href="<?phpthe_permalink()?>“ ><?phpthe_title(); ?></a></h2><small><?phpthe_time(__('F jS, Y', 'kubrick'))?></small><div class="entry"><?phpthe_content(__('Read the rest of this entry »', 'kubrick')); ?></div><p class="postmetadata"><?phpprintf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?phpedit_post_link(__('Edit', 'kubrick'), '', ' | '); ?> <?phpcomments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '',__('Comments Closed', 'kubrick') ); ?></p></div><?phpendwhile; ?><?phpelse : ?><h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2><p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p><?phpget_search_form(); ?><?phpendif; ?>投稿がある場合の処理
66.
<?phpif (have_posts()) :
?><?phpwhile (have_posts()) : the_post(); ?><div <?phppost_class(); ?> id="post-<?phpthe_ID(); ?>"><h2><a href="<?phpthe_permalink()?>“ ><?phpthe_title(); ?></a></h2><small><?phpthe_time(__('F jS, Y', 'kubrick'))?></small><div class="entry"><?phpthe_content(__('Read the rest of this entry »', 'kubrick')); ?></div><p class="postmetadata"><?phpprintf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?phpedit_post_link(__('Edit', 'kubrick'), '', ' | '); ?> <?phpcomments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '',__('Comments Closed', 'kubrick') ); ?></p></div><?phpendwhile; ?><?phpelse : ?><h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2><p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p><?phpget_search_form(); ?><?phpendif; ?>投稿がある間Loopする投稿1つ分の準備投稿の数だけループ
67.
<?phpif (have_posts()) :
?><?phpwhile (have_posts()) : the_post(); ?><div <?phppost_class(); ?> id="post-<?phpthe_ID(); ?>"><h2><a href="<?phpthe_permalink()?>“ ><?phpthe_title(); ?></a></h2><small><?phpthe_time(__('F jS, Y', 'kubrick'))?></small><div class="entry"><?phpthe_content(__('Read the rest of this entry »', 'kubrick')); ?></div><p class="postmetadata"><?phpprintf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?> | <?phpedit_post_link(__('Edit', 'kubrick'), '', ' | '); ?> <?phpcomments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '',__('Comments Closed', 'kubrick') ); ?></p></div><?phpendwhile; ?><?phpelse : ?><h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2><p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p><?phpget_search_form(); ?><?phpendif; ?>タイトル本文全部理解しないといけないの?
68.
・すべてのコードを理解する必要はない。・イメージにあったテーマを見つけてきて、
それをカスタマイズすればよい。
69.
default他のファイルは?
70.
← not foundページ
アーカイブページ コメントページ← 共通関数用← 画像一覧ページdefault 言語関連ファイル← リンクページ← 特定の1ページ← テーマのスクリーンショット← 検索ページ← 1投稿分の詳細ページ
71.
テーマのカスタマイズ方法終わり
72.
つぎに、XMLファイルを出力する方法について
73.
「MTだったらXMLの書き出しが比較的簡単に出来るんですが WPだとなかなか難しいみたいで、僕の希望としましてはWPを使ってXMLの簡単な 書き出し方法があればご教授頂きたいなと思います。RSSやFlashに使うときに便利なので・・・。」
74.
最新の投稿一覧カテゴリー毎一覧XML
75.
最新の投稿一覧カテゴリー毎一覧XML作る
76.
仕様:最新の投稿5件をXMLファイルに出力します。・日付・タイトル・投稿内容・カテゴリ
77.
最新の投稿を出す方法はindex.phpを参考にできる
79.
XML出力イメージ・・・
80.
Step1:XMLを出力するコードを作成します
81.
<?php/*Template Name: XmlForFlash*/?><?php
header('Content-Type: text/xml; charset='.get_option('blog_charset'), true); ?><?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.‘>’; ?><root><?phpquery_posts("posts_per_page=5"); ?><?phpif (have_posts()) : ?><?phpwhile (have_posts()) : the_post(); ?><item><title><![CDATA[<?php echo the_title_rss(); ?>]]></title><pubdate><?php echo the_time('Y-m-d H:i:s’); ?></pubdate><?phpthe_category_rss(); ?><description><![CDATA[<?phpthe_content_rss(); ?>]]></description></item><?phpendwhile; ?><?phpendif; ?></root><?xml version="1.0" encoding=“UTF-8” ?>タイトル時 刻<category></category>カテゴリ本文内容テンプレートタグで書くと?
82.
<?php/*Template Name: XmlForFlash*/?><?php
header('Content-Type: text/xml; charset='.get_option('blog_charset'), true); ?><?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.‘>’; ?><root><?phpquery_posts("posts_per_page=5"); ?><?phpif (have_posts()) : ?><?phpwhile (have_posts()) : the_post(); ?><item><title><![CDATA[<?php echo the_title_rss(); ?>]]></title><pubdate><?php echo the_time('Y-m-d H:i:s’); ?></pubdate><?phpthe_category_rss(); ?><description><![CDATA[<?phpthe_content_rss(); ?>]]></description></item><?phpendwhile; ?><?phpendif; ?></root>続いてループ処理を挿入->
83.
<?php/*Template Name: XmlForFlash*/?><?php
header('Content-Type: text/xml; charset='.get_option('blog_charset'), true); ?><?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.‘>’; ?><root><?phpquery_posts("posts_per_page=5"); ?><?phpif (have_posts()) : ?><?phpwhile (have_posts()) : the_post(); ?><item><title><![CDATA[<?php echo the_title_rss(); ?>]]></title><pubdate><?php echo the_time('Y-m-d H:i:s’); ?></pubdate><?phpthe_category_rss(); ?><description><![CDATA[<?phpthe_content_rss(); ?>]]></description></item><?phpendwhile; ?><?phpendif; ?></root>最新の5件を取得->
84.
<?php/*Template Name: XmlForFlash*/?><?php
header('Content-Type: text/xml; charset='.get_option('blog_charset'), true); ?><?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.‘>’; ?><root><?phpquery_posts("posts_per_page=5"); ?><?phpif (have_posts()) : ?><?phpwhile (have_posts()) : the_post(); ?><item><title><![CDATA[<?php echo the_title_rss(); ?>]]></title><pubdate><?php echo the_time('Y-m-d H:i:s’); ?></pubdate><?phpthe_category_rss(); ?><description><![CDATA[<?phpthe_content_rss(); ?>]]></description></item><?phpendwhile; ?><?phpendif; ?></root>
85.
default新規作成
86.
Step2:ファイルをWordPressに登録します
87.
①外観 > 編集②作ったテンプレートファイルがエントリされていることを確認
88.
①ページ > 新規追加②タイトルを入れる③XmlForFlashを選択する
89.
保存するとURLが得られます。
90.
完成!
Download