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
93
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)
ブロックテーマ時代における、テーマの CSS について考える Toro_Unit / 2025.09.13 @ Shinshu WordPress Meetup
torounit
0
180
ブロックテーマでサイトリニューアルした話 / Toro_Unit / 2025.04.12 @ Shinshu WordPress Meetup
torounit
1
230
Cloudflare Meetup Nagano Vol.3
torounit
1
110
僕が考える 「HTML サイトを WordPress にする」話 / 2023-11-05 Kansai WordPress Meetup
torounit
9
7.7k
Cloudflare Pages に入門してみた / 2023-10-14 Cloudflare Meetup Nagano Vol.2
torounit
2
1.9k
ブロックエディタをゴリゴリに使い倒してサイトを作った話 / Kansai WordPress Meetup 2023 09 23
torounit
15
10k
ブロックエディターカスタマイズことはじめ #wpshinshu / 2023-06-17 Shinshu WordPress Meetup vol.24
torounit
1
420
FSE時代におけるWEBサイト制作の研究 #wpshinshu / 2023-05-20 Shinshu WordPress Meetup vol.23
torounit
0
470
ブロックエディターを用いたWEBサイト開発とカスタムフィールドのあり方を考える。/ WordCamp Japan 2021
torounit
0
580
Other Decks in Technology
See All in Technology
今この時代に技術とどう向き合うべきか
gree_tech
PRO
2
2k
OAuthからOIDCへ ― 認可の仕組みが認証に拡張されるまで
yamatai1212
0
140
ソフトウェアエンジニアの生成AI活用と、これから
lycorptech_jp
PRO
0
500
React19.2のuseEffectEventを追う
maguroalternative
2
500
Introduction to Bill One Development Engineer
sansan33
PRO
0
300
Click A, Buy B: Rethinking Conversion Attribution in ECommerce Recommendations
lycorptech_jp
PRO
0
100
AIとともに歩んでいくデザイナーの役割の変化
lycorptech_jp
PRO
0
480
フレームワークを意識させないワークショップづくり
keigosuda
0
210
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
12
81k
RDS の負荷が高い場合に AWS で取りうる具体策 N 連発/a-series-of-specific-countermeasures-available-on-aws-when-rds-is-under-high-load
emiki
7
4.1k
業務効率化をさらに加速させる、ノーコードツールとStep Functionsのハイブリッド化
smt7174
2
150
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
14k
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
Balancing Empowerment & Direction
lara
5
690
GitHub's CSS Performance
jonrohan
1032
470k
Gamification - CAS2011
davidbonilla
81
5.5k
Scaling GitHub
holman
463
140k
Agile that works and the tools we love
rasmusluckow
331
21k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
For a Future-Friendly Web
brad_frost
180
10k
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