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
クライアントワークのオリジナルテーマ制作
Search
Masahiro NAKASHIMA
November 02, 2019
Programming
1
660
クライアントワークのオリジナルテーマ制作
WordCamp Tokyo 2019 セッション。「クライアントワークのオリジナルテーマ制作 〜実務でのWebサイト構築の抑えどころ〜」の資料です。
Masahiro NAKASHIMA
November 02, 2019
Tweet
Share
More Decks by Masahiro NAKASHIMA
See All by Masahiro NAKASHIMA
コロナの時代の WEBサービス 〜WordPressで実現するプラグインや機能の実装〜
kanakogi
0
640
ページビルダーツールを使った「コードを書かない」サイト制作
kanakogi
1
280
Other Decks in Programming
See All in Programming
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.6k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
640
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
5.3k
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
460
Go コードベースの構成と AI コンテキスト定義
andpad
0
160
Implementation Patterns
denyspoltorak
0
150
チームをチームにするEM
hitode909
0
450
gunshi
kazupon
1
140
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
260
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.1k
Vibe codingでおすすめの言語と開発手法
uyuki234
0
170
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
140
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
21k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Tell your own story through comics
letsgokoyo
1
780
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Designing Experiences People Love
moore
143
24k
Thoughts on Productivity
jonyablonski
74
5k
So, you think you're a good person
axbom
PRO
1
1.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
140
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
120
The Cult of Friendly URLs
andyhume
79
6.8k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
78
Transcript
None
Profile தౡਅ༸ʢφΧγϚϚαώϩʣ ผ໊ϖϯΪϯ 5XJUUFS!LBOBLPHJ 8&#ܥΤϯδχΞɾσβΠφʔ ۠ӋͱϛϟϯϚʔͰࣄ
Profile 8PSE1SFTT ࣄͷݱͰαοͱ͑ΔσβΠϯڭՊॻ ग़൛ٕज़ධࣾ )5.-$44શେࣄయ ग़൛ٕज़ධࣾ
Profile • WP CSV Exporter • WP Theme Test •
Adjust Admin Categories • WP Taxonomy Import • Check Copy ContentsʢCCCʣ ...߹ܭ11ϓϥάΠϯ
Profile ΠϚίί 2005 2019 ϑϦʔͷ8&#σβΠφʔ .PWBCMF5ZQF 8PSE1SFTT )5.-$44 1)1 +BWB4DSJQU
2012 ࣄͷׂ߹ σβΠϯ ϑϩϯτΤϯυ 1)1 8PSE1SFTTؔ
ͣͬͱ ΫϥΠΞϯτϫʔΫ ͬͯ·͢
͓ͬͯ͘ͱ ݱͰʹཱͭ5*14
ཧόʔͷ ѹతଘࡏײ
Admin Bar Position
ຊ൪αʔόʔͰ ςʔϚΛςετ͍ͨ͠
WP Theme Test
ߘϖʔδͷ ΞʔΧΠϒ͕ͳ͍
WP Post Has Archive
"VUIPSϖʔδͷอޢ
wp-login.php
function author_page_redirect() { if( is_author() ) { wp_redirect( home_url()); exit;
} } add_action( 'template_redirect', 'author_page_redirect' ); functions.php
Yoast SEO
ϒϩοΫΤσΟλʔ
ศརͳػೳ
ϚʔΫμϯ͕͑Δ
ϒϩοΫͷίϐʔ͕Ͱ͖Δ
࠶ར༻ϒϩοΫ
ཧը໘ͱ ελΠϧΛ͋ΘͤΔ
ཧը໘ͱελΠϧΛ͋ΘͤΔ ϑϩϯτ ཧը໘
function my_editor_suport() { add_theme_support( 'editor-styles' ); add_editor_style( 'assets/css/editor-style.css' ); }
add_action( 'after_setup_theme', 'my_editor_suport' ); functions.php
h2 { font-size: 24px; color: #70462E; } strong { color:
#70462E; font-weight: bold; } em { font-style: italic; font-weight: bold; } editor-style.css ←ཁૉηϨΫλͰࢦఆ
.content h2 { font-size: 24px; color: #70462E; } .content strong
{ color: #70462E; font-weight: bold; } .content em { font-style: italic; font-weight: bold; } styles.css singular.php <div class=“content”> <?php the_content() ?> </div>
ཧը໘ͱελΠϧΛ͋ΘͤΔ TUZMFTDTT FEJUPSTUZMFDTT ࣅͨΑ͏ͳهड़͕ॏෳͯ͠͠·͏
TBTTσΟϨΫτϦ DTTσΟϨΫτϦ σΟϨΫτϦߏ TUZMFTDTT FEJUPSTUZMFDTT TUZMFTTDTT FEJUPSTUZMFTDTT @DPOpHTDTT DPNQPOFOUTσΟϨΫτϦ @DPOUFOUTDTT
@IPHFTDTT
@import “_config"; h2 { font-size: 24px; color: #70462E; } strong
{ color: #70462E; font-weight: bold; } em { font-style: italic; font-weight: bold; } editor-style.scss styles.scss @import “_config"; @import "components/_content"; components/ _content.scss .content { @import "../editor-style.scss"; }
σΟϨΫτϦߏ TUZMFTDTT FEJUPSTUZMFTDTT @DPOpHTDTT DPNQPOFOUTσΟϨΫτϦ @DPOUFOUTDTT ཧը໘ʹ༻ʹهड़ @IPHFTDTT classͷதʹimport
ϒϩοΫΛ ΧελϚΠζ
࠷৽هࣄͷߘ
Advanced Posts Blocks
UIFNF UFNQMBUFQBSUT CMPDLT BEWBODFEQPTUTCMPDLT QPTUQIQ σΟϨΫτϦߏ QPTUTQIQ DIJMESFOQIQ ෳߘϒϩοΫɹɹtemplate-parts/blocks/advanced-posts-blocks/posts.php ݸผߘϒϩοΫɹɹtemplate-parts/blocks/advanced-posts-blocks/post.php
ࢠߘϒϩοΫɹɹɹtemplate-parts/blocks/advanced-posts-blocks/children.php
template-parts/blocks/advanced-posts-blocks/posts.php <div class="row"> <?php if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?> <div class="col-md-4"> <article <?php post_class('news'); ?>> <div class="news_pic"> <?php the_post_thumbnail('medium'); ?> </div> <h2><?php the_title(); ?></h2> </article> </div> <?php endwhile; ?> <?php wp_reset_postdata(); ?> <?php endif; ?> </div>
ϒϩοΫΛ࡞Δ
Block Lab
1.blocks/{name}/preview.php 2.blocks/preview-{name}.php 3.blocks/preview.php 4.blocks/{name}/block.php 5.blocks/block-{name}.php 6.blocks/block.php Block Lab ͷςϯϓϨʔτ֊
ϒϩοΫΤσΟλʔ࣌ͷ σβΠϯ
ϒϩοΫΛѲͨ͠ σβΠϯ
ϫʔΫϑϩʔ σβΠϯ )5.- 8PSE1SFTT ϫΠϠʔ ϫΠϠʔ ʢϒϩοΫΤσΟλʔʣ σβΠϯ )5.- աڈʹͭͬͨ͘ϒϩοΫΛར༻ɺ
ඞཁ࠷ݶͷ)5.-੍࡞ 8PSE1SFTT աڈʹͭͬͨ͘ϒϩοΫΛར༻ɺ ඞཁ࠷ݶͷϒϩοΫ੍࡞ ͜Ε·Ͱ ϒϩοΫΤσΟλʔ ϫΠϠʔ ʢϒϩοΫΤσΟλʔʣ σβΠϯ ϔομʔɺϑολʔͳͲ )5.- ඞཁ࠷ݶͷ)5.-੍࡞ 8PSE1SFTT ඞཁ࠷ݶͷϒϩοΫ੍࡞ ϒϩοΫΤσΟλʔ ରԠςʔϚ
ϒϩοΫΛࢿ࢈ʹ͢Δ
͍͞͝ʹ
%FNPDSBUJ[F1VCMJTIJOH ύϒϦογϯάͷຽओԽ
XPSEQSFTT 8PSEQSFTT 8PSE1SFTT º º ˓ ϫʔυϓϨεͷਖ਼͍͠௲Γ
ΟυΡε Οτε Οζ ϫΠζ ϫΠυ XJEUIͷಡΈํ
ࣝͷౕྴʹͳΒͳ͍ ࣝΛ*OQVUͨ͜͠ͱͰၗຫʹͳΓ ৽͍͠ػձΛଛࣦ͢Δ
ͭͳ͛Δɻ
5IBOLT