Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WordPress の機能をちゃんと知る
Search
Toro_Unit (Hiroshi Urabe)
March 31, 2018
Technology
0
84
WordPress の機能をちゃんと知る
WordBench Nagano vol. 17 での登壇資料です
Toro_Unit (Hiroshi Urabe)
March 31, 2018
Tweet
Share
More Decks by Toro_Unit (Hiroshi Urabe)
See All by Toro_Unit (Hiroshi Urabe)
Cloudflare Meetup Nagano Vol.3
torounit
1
59
僕が考える 「HTML サイトを WordPress にする」話 / 2023-11-05 Kansai WordPress Meetup
torounit
9
7.4k
Cloudflare Pages に入門してみた / 2023-10-14 Cloudflare Meetup Nagano Vol.2
torounit
2
1.6k
ブロックエディタをゴリゴリに使い倒してサイトを作った話 / Kansai WordPress Meetup 2023 09 23
torounit
14
9.8k
ブロックエディターカスタマイズことはじめ #wpshinshu / 2023-06-17 Shinshu WordPress Meetup vol.24
torounit
1
380
FSE時代におけるWEBサイト制作の研究 #wpshinshu / 2023-05-20 Shinshu WordPress Meetup vol.23
torounit
0
420
ブロックエディターを用いたWEBサイト開発とカスタムフィールドのあり方を考える。/ WordCamp Japan 2021
torounit
0
550
ブロックエディターで変わる、WordPress でのウェブサイト開発 / SaCSS Special 26
torounit
4
850
Block Editor カスタマイズ入門 #WPmeetupOsaka / Get started customize for block editor
torounit
12
3.2k
Other Decks in Technology
See All in Technology
Pwned Labsのすゝめ
ken5scal
2
450
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
19k
RayでPHPのデバッグをちょっと快適にする
muno92
PRO
0
190
Perlの生きのこり - エンジニアがこの先生きのこるためのカンファレンス2025
kfly8
2
270
【内製開発Summit 2025】イオンスマートテクノロジーの内製化組織の作り方/In-house-development-summit-AST
aeonpeople
2
690
Active Directory攻防
cryptopeg
PRO
8
5.5k
php-conference-nagoya-2025
fuwasegu
0
150
Share my, our lessons from the road to re:Invent
naospon
0
150
クラウド食堂とは?
hiyanger
0
120
大規模アジャイルフレームワークから学ぶエンジニアマネジメントの本質
staka121
PRO
3
1.2k
クラウド関連のインシデントケースを収集して見えてきたもの
lhazy
8
1.2k
Two Blades, One Journey: Engineering While Managing
ohbarye
4
2.1k
Featured
See All Featured
Scaling GitHub
holman
459
140k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Agile that works and the tools we love
rasmusluckow
328
21k
Making Projects Easy
brettharned
116
6k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Git: the NoSQL Database
bkeepers
PRO
427
65k
4 Signs Your Business is Dying
shpigford
182
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
How STYLIGHT went responsive
nonsquared
98
5.4k
Transcript
WordPress ͷػೳΛͪΌΜͱΔɻ Toro_Unit @2018.03.31 / WBNagano #17 1
$ whoami 2
Toro_Unit ෦ ߛ (͏Β ͻΖ͠) HAMWORKS • Frontend Engineer •
WordPress Plugin and Theme Developer • Custom Post Type Permalinks • Vanilla • more... Github: @torounit Twitter: @Toro_Unit 3
ࡳຈͷձࣾͰϦϞʔτ ϫʔΫͯ͠·͢ɻ 4
Plugins and Themes • Custom Post Type Permalinks • Simple
Post Type Permalinks • Powerful Posts Per Page (PPPP) • Responsive Slide • Vanilla • and more... 5
Contribution • WordBench ϞσϨʔλʔ • WordCamp Kyoto 2017 ࣮ߦҕһ
• WordCamp Tokyo 2017 Speaker • WordBench.org • VCCW Team • etc... 6
WordPress ͷςʔϚ࡞ͬͯ·͔͢ʁ WordPress ͰαΠτ࡞ͬͯ·͔͢ʁ 7
WordPress ͷػೳͬͯ·͔͢ʁ 8
ࠓݴ͍͍ͨ͜ͱɿωοτͰरͬͨ ίʔυΛfunctions.php ʹίϐϖ͢Δ લʹߟ͑Α͏ɻ 9
Case.1 ίϝϯτϑΟʔυΛফ͍ͨ͠ɻ <link rel="alternate" type="application/rss+xml" title="Toro_Unit » ϑΟʔυ" href="https://torounit.com/feed/" />
<link rel="alternate" type="application/rss+xml" title="Toro_Unit » ίϝϯτϑΟʔυ" href="https://torounit.com/comments/feed/" /> ίϝϯτΘͳ͍͔Βফ͍ͨ͠ɻ 10
remove_action( 'wp_head', 'feed_links_extra', 3 ); add_filter( 'feed_links_show_comments_feed', '__return_false'); άάΔͱ͜Μͳͷग़ͯ͘Δ͚Ͳɾɾɾ 11
12
• feed_links_extra Λফ͢ͱɺίϝϯτҎ֎ͷϑΟʔυແ ͘ͳΔɻ • ࡢࠓ feed ͕ඞཁͱ͍͏໘গͳ͍Ͱ͠ΐ͏͕ɻɻɻ • link
λάΛফͨ͠ͱ͜ΖͰɺΞΫηεͰ͖ͯ͠·͏ɻ 13
• ҆қͳίϐϖΛ͢Δલʹɺཧը໘ΛோΊΔɻ • ཧը໘Ͱग़དྷΔ͜ͱཧը໘Ͱɻ 14
case.2 admin-bar Λফ͍ͨ͠ɻ 15
<?php wp_footer();?> ·͔͞ɺwp_footer ফͯ͠ͳ͍ΑͶɾɾɾɻ 16
• wp_head, wp_footer WordPress ɺϓϥάΠϯ͕ɺCSS, ϝλλάɺJSͳͲΛग़ྗͨ͠Γ͢ΔࡍʹΘΕΔͷɻ • ίϨ͕ແ͍ςʔϚςʔϚͱͯ͠όάͬͯΔɻ 17
πʔϧόʔͷ߲͔Βඇදࣔʹग़དྷΔɻ 18
case.3 ߘҰཡϖʔδ Λ࡞Δ 19
<?php query_posts( array( 'post_type' => 'post', 'paged' => get_query_var('paged') )
);?> <?php if( have_posts(): while( have_posts()) : the_post();?> <?php endwhile; endif;?> <?php wp_reset_postdata();?> <?php wp_reset_query();?> ͱ͔ <?php $blog = new WP_Query( array( 'post_type' => 'post', 'paged' => get_query_var('paged') ) );?> <?php if($blog->have_posts(): while($blog->have_posts() ): $blog->the_post();?> <?php endwhile; endif;?> <?php wp_reset_postdata();?> Ͱ࣮ग़དྷΔ͔͠Ε·ͤΜ͕ɻɻɻ 20
දࣔઃఆͰઃఆͰ͖Δͧɻ ϗʔϜϖʔδʹɺfront-page.php → page.php → index.php ͷςϯϓϨʔτ͕ద༻͞ΕΔɻ ߘϖʔδʹɺhome.php → index.php
ͷॱͰςϯϓϨʔτ͕ద༻͞ΕΔɻ σϑΥϧτͷ ʮ࠷৽ͷߘʯͷ߹ɺfront-page.php → home.php → index.php ͷॱɻ 21
ςʔϚͷ࡞Γํɻ ެࣜͷυΩϡϝϯςʔγϣϯɻࠓͷͱ͜ Ζӳޠ͔͠ແ͍͚ͲɺίʔυͰͷղઆ ଟ͍ͷͰҙ֎ʹͳΜͱ͔ͳΔɻ • Theme Developer Handbook • https://developer.wordpress.org/
themes/ 22
ςʔϚϨΠϠʔͱϓϥάΠϯϨΠϠʔ • ςʔϚ͕ͬͯྑ͍ͷɺσβΠϯɺݟͨʹؔΘΔ͜ͱͷ Έɻ • WordPress ͷڍಈΛม͍͑ͨͱ͖ϓϥάΠϯͰɻ 23
• ϓϥάΠϯʹ͓͍ͯͨ͠ํ͕ɺςʔϚΛม͑ͯෆ۩߹ແ ͍ɻ • ػೳʹ໊લΛ͚Δ͜ͱͰɺͦΕ͕ԿΛ͢ΔͨΊͷϞϊͳͷ ͔ʁ͕ޙ͔ΒผՄೳɻ 24
ใͷूΊํ 25
• ωοτͷใۄੴࠞަɻ҆қʹඈͼ͔ͭͣɺଞͷϞϊݟΔɻ • ·ͣɺ৴པͰ͖ΔϦιʔεΛௐΔɻ • ެࣜͷυΩϡϝϯςʔγϣϯ • Codex • σϑΥϧτςʔϚ
• WordPress.org ܝࡌςʔϚ • ༗໊ͳϓϥάΠϯ/ςʔϚ࡞ऀͷίʔυɻ • forum Ͱͷղɻ/ ࣭ͯ͠ΈΔɻ 26
ࣗͰ৮ͬͯΈΔɻ • ·ͣࣗͰԿͰ͍͍͔Β৮ͬͯΈΔɻ • ࣗͰ͍ͪ͜͝ͱ͔ΛΘ͔ͬͯΔͱɺצॴͱ͔͕͔ͭΈ ͍͢ɻ • ࣗ1Ϣʔβʔͱ͍ͯ͢͠ɻ 27
and.. Let's Join WordBench! wordbench.org 28
͓ΘΓɻ Thanks! Github: @torounit Twitter: @Toro_Unit Facebook: fb.me/torounit WEB Site:
https://torounit.com 29