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.org掲載テーマのメソッド
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Toro_Unit (Hiroshi Urabe)
October 28, 2017
Technology
3.7k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
現場でも使えるWordPress.org掲載テーマのメソッド
https://2017.wordfes.org/sessions/1703/
WordFes 2017 での登壇資料です。
Toro_Unit (Hiroshi Urabe)
October 28, 2017
More Decks by Toro_Unit (Hiroshi Urabe)
See All by Toro_Unit (Hiroshi Urabe)
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
690
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
590
ブロックテーマとこれからの WordPress サイト制作 / nishinomiya.dev@2025-12-21
torounit
1
280
ブロックテーマとこれからの WordPress サイト制作 / Toyama WordPress Meetup Vol.81
torounit
0
810
ブロックテーマ時代における、テーマの CSS について考える Toro_Unit / 2025.09.13 @ Shinshu WordPress Meetup
torounit
0
790
ブロックテーマでサイトリニューアルした話 / Toro_Unit / 2025.04.12 @ Shinshu WordPress Meetup
torounit
1
340
Cloudflare Meetup Nagano Vol.3
torounit
1
170
僕が考える 「HTML サイトを WordPress にする」話 / 2023-11-05 Kansai WordPress Meetup
torounit
9
8.8k
Cloudflare Pages に入門してみた / 2023-10-14 Cloudflare Meetup Nagano Vol.2
torounit
2
2.3k
Other Decks in Technology
See All in Technology
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
140
コードレビューを制するチームがソフトウェアデリバリーのフローを制す / Beyond Code Review: Distributing Its Responsibilities Across the SDLC
mtx2s
4
1.2k
AI Testing Talks: Challenges of Applying AI in Software Testing: From Hype to Practical Use
exactpro
PRO
1
140
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.8k
MIERUNE JCT 発表資料「宇宙から伊能忠敬ごっこ」
syuchimu
0
190
AWSシリコン最前線 〜AI時代のチップ選択を読み解く〜
htokoyo
1
150
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
250
AIプラットフォームを運用し続けるための可観測性
tanimuyk
4
1.1k
Claude Code×Terraform IaC テンプレート駆動開発
itouhi
1
390
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.8k
サプライチェーンセキュリティの空白地帯 - 信頼できる”依存性”の未来を考える
rung
PRO
2
730
Agentic Defenseとともにセキュリティエンジニアが輝き続けるには / How Security Engineers Can Keep Excelling with Agentic Defense
yuj1osm
0
110
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
940
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
Amusing Abliteration
ianozsvald
1
200
Designing for Timeless Needs
cassininazir
1
250
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Side Projects
sachag
455
43k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
480
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Paper Plane (Part 1)
katiecoart
PRO
0
8.5k
Transcript
ݱͰ͑Δ WordPress.orgܝࡌςʔϚͷ ϝιου Toro_Unit @2017.10.28 / WordFes 1
ʮެࣜσΟϨΫτϦͷςʔϚͱɺҊ݅ͰͷςʔϚͬͯผ?ʯ 2
ͦΜͳ͜ͱͳ͍Αʂ 3
Toro_Unit ෦ ߛ (͏Β ͻΖ͠) ϑϦʔϥϯε Frontend Engineer / Web
Designer Plugin and Theme Developer Github: @torounit Twitter: @Toro_Unit Facebook: fb.me/torounit Blog: https://torounit.com 4
5
6
Plugins and Themes. • Custom Post Type Permalinks • Simple
Post Type Permalinks • Powerful Posts Per Page (PPPP) • Responsive Slide • Vanilla • and more... 7
Contribution • WordBench ϞσϨʔλʔ • WordCamp Kyoto 2017 ࣮ߦҕһ
• WordCamp Tokyo 2017 Speaker • WordBench.org • VCCW Team • etc... 8
ݝদຊࢢ͔Β͖·ͨ͠ɻ1 • ϫΠϯ͓͍͍͠Αɻ • ͦΖͦΖڶഴ͓͍͍͠Αɻ • ͍͔͓͍͍͢͠Αɻ 1 https://commons.wikimedia.org/wiki/File: 130608_Matsumoto_Castle_Matsumoto_Nagano_pref_Japan02bs4.jpg
Author: 663highland. License: CC BY 2.5 9
WordPress.org ςʔϚσΟ ϨΫτϦܝࡌςʔϚ ͱʁ • https://wordpress.org/themes/ • WordPress ͷཧը໘͔ΒΠϯε τʔϧɾߋ৽͕ग़དྷΔςʔϚୡɻ
• ςʔϚϨϏϡʔΛ௨ա͠ͳ͍ͱܝࡌ Ͱ͖ͳ͍ɻ 10
ςʔϚͷ࡞Γํɻ ެࣜͷυΩϡϝϯςʔγϣϯɻࠓͷͱ͜ Ζӳޠ͔͠ແ͍͚ͲɺίʔυͰͷղઆ ଟ͍ͷͰҙ֎ʹͳΜͱ͔ͳΔɻ • Theme Developer Handbook • https://developer.wordpress.org/
themes/ 11
ςʔϚϨϏϡʔΛ௨Βͳ͍͜ͱɻ • ΤεέʔϓͳͲ͕͞Ε͍ͯͳ͍ɻ੬ऑੑ͕༗ΔϞϊɻ • ϓϥάΠϯςϦτϦʔͷػೳɺϓϥάΠϯͰରԠ͢Δ͖ػ ೳ͕͍ͬͯΔϞϊɻ ༷ʑͳ͖·Γ͕͋Δɻ 12
Required – Theme Review Team • https://make.wordpress.org/themes/handbook/review/ required/ • ຊޠ༁
https://mirucon.github.io/required-ja/ 13
ϓϥάΠϯςϦτϦʔ • https://make.wordpress.org/themes/handbook/review/ required/explanations-and-examples/#plugin-territorys σβΠϯʹؔ࿈͠ͳ͍ػೳΛςʔϚʹؚΊ͍͚ͯͳ͍ɻ 14
ྫ • Analytics·ͨτϥοΩϯάͷαϙʔτ • SEOΦϓγϣϯ • ͓͍߹ΘͤϑΥʔϜ • ඇσβΠϯؔ࿈ͷϝλϘοΫε •
ϦιʔεΩϟογϯά • ཧྖҬͷμογϡϘʔυΟδΣοτ • ΧελϜߘλΠϓͱγϣʔτίʔυ • ιʔγϟϧϝσΟΞͷʮ͖ʯɺʮϑΥϩʔʯɺʮڞ༗ʯϘλϯ 15
͍ͨΜʁ 16
ͪΌΜͱकΔͱޮతͳ։ൃ͕ग़དྷΔɻ ݁ՌతʹָʹͳΔΑɻ 17
ςʔϚΛૄ݁߹ʹͰ͖Δɻ 18
νʔϜͰͷ։ൃʹ͓͚Δɺׂͷ໌֬Խɻ • ͦΕͧΕ͕୯ಠͰ͔ͬ͠Γػೳ͢Εۀ͕͍͢͠ɻ • ػೳA͞ΜɺσβΠϯɾϚʔΫΞοϓB͞Μɺهࣄೖྗ C͞Μɻ • ྫɿςʔϚͷ functions.php ͰΧελϜߘλΠϓΛઃఆ
͢ΔͱͦͷςʔϚΛ༗ޮʹ͠ͳ͍ͱɺهࣄ͕ॻ͚ͳ͍ɻ 19
• ϝϯςφϯεɾվमɾϦχϡʔΞϧ࣌ͷख͕ؒগͳ͍ɻ • @see Hiroshi Urabe, Hiromu Hasegawa: ͦͷઃܭେৎʁແ ཧͷͳ͍WordPressͷઃܭͱߏஙΛߟ͑Δ
| WordPress.tv 20
ͦͷͨΊʹ. 21
Theme Unit Test ςʔϚϢχοτςετ - WordPress Codex ຊޠ൛ WYSIWYG ΤσΟλͰී௨ʹهࣄΛॻ͍ͨ
Βී௨ʹදࣔ͞ΕΔΑ͏ʹͪΌΜͱCSSΛ ॻ͘ɻ • ճΓࠐΈΩϟϓγϣϯ͖ը૾ɺΪϟ ϥϦʔ݁ߏΕ͕ͪɻ • ී௨ͷHTML͕classΛ͚ͣʹɺͪΌ Μͱදࣔग़དྷΕɺςʔϚΛม͑ͯ ͪΌΜͱදࣔͰ͖Δͣɻ 22
WordPressͰग़དྷΔ͜ͱΛͪΌΜͱग़དྷΔΑ͏ʹͭ͘Ζ͏ɻ • WordPressʹඪ४ࡌ͞Ε͍ͯΔͷ͕ͪΌΜͱಈ͘Α͏ʹ ͢Δɻ • υΩϡϝϯςʔγϣϯɺαϙʔτͷίετ͕ݮΔɻ • ຊʹग़དྷΔͬͯॻ͍ͯ͋ΔͷʹɾɾɾͬͯͳΔͷɺ ͍ͮΒ͞ͱγεςϜͷෆ৴ײΛੜΉɻ 23
Theme Check Theme Check — WordPress Plugins 24
νΣοΫ߲ • ίʔσΟϯάϧʔϧ • ΤεέʔϓɾαχλΠζ͞Ε͍ͯͳ͍ • ඇਪͳؔɾςϯϓϨʔτλά • ඞਢͷ class
ͷଘࡏɻ • etc... 25
ཧը໘͔Β͍Ζ͍Ζมߋग़དྷΔΑ͏ ʹ͍ͨ͠ɻ 26
27
The Customize API Theme Options – The Customize API |
Theme Developer Handbook | WordPress Developer Resources ΧελϚΠβʔʹઃఆΛՃ͢ΔAPI. 28
࣮ 29
function my_customize_register( WP_Customize_Manager $wp_customize ) { //ηΫγϣϯͷՃ $wp_customize->add_section( 'jumbotron', array(
'title' => __( 'jumbotron' ), ) ); //ઃఆͷΦϓγϣϯ $wp_customize->add_setting( 'jumbotron_title', array( 'default' => 'Hello World!', 'sanitize_callback' => 'esc_html', )); // ϑΥʔϜͷՃ $wp_customize->add_control( 'jumbotron_title', array( 'section' => 'jumbotron', 'label' => __( 'Jumbotron Title', 'demo' ), )); } add_action( 'customize_register', 'my_customize_register' ); 30
ςϯϓϨʔτͰͷදࣔ <h1> <?php echo esc_html( get_theme_mod( 'jumbotron_title', 'Hello World' )
); ?> </h1> 31
͜Μ͚ͩʂ ΧελϜϑΟʔϧυΑΓ؆୯͡Όͳ͍Ͱ͔͢ʁ 32
DEMO torounit/customizer-demo 33
ͳΜ͔ͬ͞Γ͢Δɻɻ 34
Selective Refresh 35
Selective Refresh ͱ Ajax Λͬͯ෦తʹHTMLΛߋ৽ɻ Selective Refresh in the Customizer
– Make WordPress Core 36
function my_customize_register( WP_Customize_Manager $wp_customize ) { $wp_customize->add_setting( 'jumbotron_lead', array( 'default'
=> '', 'sanitize_callback' => 'esc_html', 'transport' => 'postMessage', // JSͰߋ৽͢ΔΑ͏ʹɻ ) ); $wp_customize->add_control( 'jumbotron_lead', array( 'section' => 'jumbotron', )); //ॻ͖͑ΔHTMLΛઃఆ $wp_customize->selective_refresh->add_partial( 'jumbotron_lead', array( 'selector' => '.jumbotron .lead', 'render_callback' => function() { return get_theme_mod( 'jumbotron_lead' ); }, ) );} add_action( 'customize_register', 'my_customize_register' ); 37
͜ΕͰAJAXͰߋ৽͞ΕΔΑ͏ʹɻ 38
JavaScriptͰૢ࡞ͯ͠ɺߋʹߴʹɻ 39
function my_customize_preview_js() { wp_enqueue_script( 'my-customize-preview', get_template_directory_uri() . '/customize-preview.js', array( 'customize-preview'
), false, true ); } add_action( 'customize_preview_init', 'my_customize_preview_js' ); 40
(function( $ ) { wp.customize( 'jumbotron_lead', function( value ) {
value.bind( function( to ) { $( '.jumbotron .lead' ).text( to ); } ); } ); })( jQuery ); 41
͍Ͳ͜Ζ 42
DEMO torounit/fesdemo ίϯςϯπεϥΠμʔΛςʔϚΧελϚΠβʔͰมߋग़དྷΔΑ͏ ʹɻ 43
• Twentysevnteen ͷτοϓϖʔδͷΧελϚΠζ ΧελϚ ΠβʔͰͷ࣮ɻ • Lightning • s56bouya/nishiki: WordPress
theme Nishiki. • Snow Monkey – 100%GPL ͷϝσΟΞ/ϒϩά͚ WordPress ༗ྉςʔϚ 44
·ͱΊɻ • ܝࡌςʔϚɺීஈͷҊ݅ಉ͡Α͏ʹ࡞ΕΔʂ • ·ͣຊମͷػೳΛͪΌΜͱ͍ͦ͏ɻ • _s σϑΥϧτςʔϚ (
Twenty γϦʔζ ) ΛಡΉͱ͍Ζ͍Ζ ൃݟ͕ଟ͍ɻTheme Development Examples 45
Thanks! Github: @torounit Twitter: @Toro_Unit Facebook: fb.me/torounit Blog: https://torounit.com 46