Submit Search
Templating WordPress
2 likes
6,492 views
Konstantin Kovshenin
At WordCamp Sofia 2013
Technology
Business
Related topics:
Web Design and Development
Read more
1 of 25
Download now
Downloaded 17 times
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
More Related Content
DOC
Sumahexavector
jbersosa
DOCX
Simular un next del recordset en php de forma rudimentaria
jbersosa
PDF
การบันทึกและออกจากโปรแกรมMspowerpoint
เทวัญ ภูพานทอง
DOC
Sumahex
jbersosa
PDF
การตกแต่งพื้นหลังให้กับสไลด์
เทวัญ ภูพานทอง
PDF
การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์
เทวัญ ภูพานทอง
PDF
Acções acreditadas fevereiro 2012
João Lima
PDF
การสร้างรูปทรงเรขาคณิต
เทวัญ ภูพานทอง
Sumahexavector
jbersosa
Simular un next del recordset en php de forma rudimentaria
jbersosa
การบันทึกและออกจากโปรแกรมMspowerpoint
เทวัญ ภูพานทอง
Sumahex
jbersosa
การตกแต่งพื้นหลังให้กับสไลด์
เทวัญ ภูพานทอง
การเรียกใช้และการเปลี่ยนรูปแบบการแสดงข้อมูลในไฟล์และโฟลเดอร์
เทวัญ ภูพานทอง
Acções acreditadas fevereiro 2012
João Lima
การสร้างรูปทรงเรขาคณิต
เทวัญ ภูพานทอง
What's hot
(19)
PDF
การแทรกรูปภาพ
เทวัญ ภูพานทอง
PDF
Introducción a Bolt
Asier Marqués
PPTX
Form Script
lotlot
PDF
การแทรกรูปภาพ
เทวัญ ภูพานทอง
PDF
Declaração de Voto da JSD Golegã no Conselho Municipal Juventude Golegã 2012
jsdgolega
PDF
jQuery - Javascript para quem não sabe Javascript
Nando Vieira
PDF
Managen van Verwachtingen.
Groenewoud
TXT
Index2
grateful7
TXT
Miniray.php
maeeeng69
PDF
การปรับแต่งตัวอักษร
เทวัญ ภูพานทอง
PDF
Presentación JxNet - Software de Gestión Jurídica Corporativa
Sisem Soluciones de Información S.A
PDF
Sumahexavector
jbersosa
PDF
การแทรกสัญลักษณ์หน้าข้อความ
เทวัญ ภูพานทอง
PDF
การแทรกอักษรศิลป์
เทวัญ ภูพานทอง
PDF
Ryn January 2011
Deron Johnson
PDF
OFFENSE
BFLLEVEL1
PDF
Crea un tema compatibile con le ultime novità WordPress
SkillsAndMore
PDF
The evil consequences of fornication and adultery
Caller To Islam / الداعية الإسلامي
PDF
Aeman dee ekkadunnaaru
venkatesha9
การแทรกรูปภาพ
เทวัญ ภูพานทอง
Introducción a Bolt
Asier Marqués
Form Script
lotlot
การแทรกรูปภาพ
เทวัญ ภูพานทอง
Declaração de Voto da JSD Golegã no Conselho Municipal Juventude Golegã 2012
jsdgolega
jQuery - Javascript para quem não sabe Javascript
Nando Vieira
Managen van Verwachtingen.
Groenewoud
Index2
grateful7
Miniray.php
maeeeng69
การปรับแต่งตัวอักษร
เทวัญ ภูพานทอง
Presentación JxNet - Software de Gestión Jurídica Corporativa
Sisem Soluciones de Información S.A
Sumahexavector
jbersosa
การแทรกสัญลักษณ์หน้าข้อความ
เทวัญ ภูพานทอง
การแทรกอักษรศิลป์
เทวัญ ภูพานทอง
Ryn January 2011
Deron Johnson
OFFENSE
BFLLEVEL1
Crea un tema compatibile con le ultime novità WordPress
SkillsAndMore
The evil consequences of fornication and adultery
Caller To Islam / الداعية الإسلامي
Aeman dee ekkadunnaaru
venkatesha9
Ad
Viewers also liked
(20)
PDF
The Settings API
Konstantin Kovshenin
PDF
7 Tips for Better WordPress Theme Development
Konstantin Kovshenin
PDF
Road to Platform @ WordPress.com VIP Workshop 2014
Konstantin Kovshenin
PDF
Memory Management in WordPress
Konstantin Kovshenin
PDF
Things I Wish I Had Known Before Developing a WordPress Theme
Konstantin Kovshenin
PDF
Где брать ИДЕИ для написания постов и плагинов WordPress
Misha Rudrastyh
PDF
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
Ozh
PDF
High Performance WordPress
vnsavage
PDF
Вёрстка по методологии БЭМ
versusbassz
PDF
SEO - поведенческие факторы.
Pavel Karpov
PPTX
следите за-языком-20150709
Doug Lawrence
PDF
Premium-темы WordPress
versusbassz
PDF
Защищаем WordPress-сайт от хакерских атак
Ruslan Sukhar
PDF
WordPress под нагрузкой: масштабирование и отказоустойчивость
Konstantin Kovshenin
PDF
WordPress: Getting Under the Hood
Scott Taylor
PDF
Пожиратели памяти в WordPress
Konstantin Kovshenin
PDF
State of the Word 2014
photomatt
PDF
WordPress 4.4 and Beyond
Scott Taylor
PDF
State of the Word 2016
photomatt
PDF
What Makes Great Infographics
SlideShare
The Settings API
Konstantin Kovshenin
7 Tips for Better WordPress Theme Development
Konstantin Kovshenin
Road to Platform @ WordPress.com VIP Workshop 2014
Konstantin Kovshenin
Memory Management in WordPress
Konstantin Kovshenin
Things I Wish I Had Known Before Developing a WordPress Theme
Konstantin Kovshenin
Где брать ИДЕИ для написания постов и плагинов WordPress
Misha Rudrastyh
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
Ozh
High Performance WordPress
vnsavage
Вёрстка по методологии БЭМ
versusbassz
SEO - поведенческие факторы.
Pavel Karpov
следите за-языком-20150709
Doug Lawrence
Premium-темы WordPress
versusbassz
Защищаем WordPress-сайт от хакерских атак
Ruslan Sukhar
WordPress под нагрузкой: масштабирование и отказоустойчивость
Konstantin Kovshenin
WordPress: Getting Under the Hood
Scott Taylor
Пожиратели памяти в WordPress
Konstantin Kovshenin
State of the Word 2014
photomatt
WordPress 4.4 and Beyond
Scott Taylor
State of the Word 2016
photomatt
What Makes Great Infographics
SlideShare
Ad
More from Konstantin Kovshenin
(9)
PDF
Scaling out with WordPress
Konstantin Kovshenin
PDF
7 убийц производительности WordPress
Konstantin Kovshenin
PDF
Будущее WordPress (SPB, 2014)
Konstantin Kovshenin
PDF
Будущее WordPress
Konstantin Kovshenin
PDF
Как повысить скорость вашего сайта на WordPress
Konstantin Kovshenin
PDF
Основые безопасности WordPress
Konstantin Kovshenin
PDF
Цикл разработки WordPress
Konstantin Kovshenin
PDF
P2
Konstantin Kovshenin
PDF
Секреты WP_Query
Konstantin Kovshenin
Scaling out with WordPress
Konstantin Kovshenin
7 убийц производительности WordPress
Konstantin Kovshenin
Будущее WordPress (SPB, 2014)
Konstantin Kovshenin
Будущее WordPress
Konstantin Kovshenin
Как повысить скорость вашего сайта на WordPress
Konstantin Kovshenin
Основые безопасности WordPress
Konstantin Kovshenin
Цикл разработки WordPress
Konstantin Kovshenin
P2
Konstantin Kovshenin
Секреты WP_Query
Konstantin Kovshenin
Templating WordPress
1.
Templating WordPress Konstantin Kovshenin Automattic
4.
author-$nicename.php author-$id.php author.php archive.php paged.php index.php
5.
$templates = array( 'foo.php', 'bar.php', 'baz.php', ); $template
= locate_template( $templates );
6.
function get_sidebar( $name
= null ) { $templates = array(); if ( '' !== $name ) $templates[] = "sidebar-{$name}.php"; $templates[] = 'sidebar.php'; } locate_template( $templates, true );
7.
get_sidebar( 'left' ); //
sidebar-left.php // sidebar.php
8.
get_header( 'foo' ); //
header-foo.php // header.php get_footer( 'bar' ); // footer-bar.php // footer.php
9.
get_template_part( 'foo', 'bar'
); // foo-bar.php // foo.php
10.
get_template_part( 'content', get_post_format() ); // // // // // content-gallery.php content-quote.php content-image.php ... content.php
11.
template-loader.php
12.
if ( is_404() && $template
= get_404_template() ) : elseif ( is_tag() && $template = get_tag_template() ) : elseif ( is_date() && $template = get_date_template() ) : elseif ( is_category() && $template = get_category_template() ) : elseif ( is_author() elseif ( is_archive() elseif ( is_paged() else : && $template = get_author_template() && $template = get_archive_template() && $template = get_paged_template() ) : ) : ) : $template = get_index_template(); endif; if ( $template = apply_filters( 'template_include', $template ) ) include( $template );
13.
if ( is_404() && $template
= get_404_template() ) : elseif ( is_tag() && $template = get_tag_template() ) : elseif ( is_date() && $template = get_date_template() ) : && $template = get_paged_template() ) : elseif ( is_category() && $template = get_category_template() ) : elseif ( is_author() elseif ( is_archive() elseif ( is_paged() else : && $template = get_author_template() && $template = get_archive_template() ) : ) : $template = get_index_template(); endif; if ( $template = apply_filters( 'template_include', $template ) ) include( $template );
14.
if ( is_404() && $template
= get_404_template() ) : elseif ( is_tag() && $template = get_tag_template() ) : elseif ( is_date() && $template = get_date_template() ) : elseif ( is_category() && $template = get_category_template() ) : elseif ( is_author() elseif ( is_archive() elseif ( is_paged() else : && $template = get_author_template() && $template = get_archive_template() && $template = get_paged_template() ) : ) : ) : $template = get_index_template(); endif; if ( $template = apply_filters( 'template_include', $template ) ) include( $template );
15.
if ( is_404() && $template
= get_404_template() ) : elseif ( is_tag() && $template = get_tag_template() ) : elseif ( is_date() && $template = get_date_template() ) : elseif ( is_category() && $template = get_category_template() ) : elseif ( is_author() elseif ( is_archive() elseif ( is_paged() else : && $template = get_author_template() && $template = get_archive_template() && $template = get_paged_template() ) : ) : ) : $template = get_index_template(); endif; if ( $template = apply_filters( 'template_include', $template ) ) include( $template );
16.
// get_author_template() $templates[] =
"author-{$author->nicename}.php"; $templates[] = "author-{$author->ID}.php"; $templates[] = 'author.php'; $template = locate_template( $templates );
17.
if ( is_404() && $template
= get_404_template() ) : elseif ( is_tag() && $template = get_tag_template() ) : elseif ( is_date() && $template = get_date_template() ) : elseif ( is_category() && $template = get_category_template() ) : elseif ( is_author() elseif ( is_archive() elseif ( is_paged() else : && $template = get_author_template() && $template = get_archive_template() && $template = get_paged_template() ) : ) : ) : $template = get_index_template(); endif; if ( $template = apply_filters( 'template_include', $template ) ) include( $template );
18.
if ( $template
= apply_filters( 'template_include', $template ) ) include( $template );
19.
function my_template_include( $template
) { if ( my_is_maintenance() && $located = locate_template( 'maintenance.php' ) ) $template = $located; return $template; } add_filter( 'template_include', 'my_template_include' );
20.
locate_template( array( 'foo.php', 'bar.php',
'baz.php' ) ); // // // // // // child/foo.php parent/foo.php child/bar.php parent/bar.php child/baz.php parent/baz.php
21.
locate_template( 'related-posts.php', true
); // child/related-posts.php // parent/related-posts.php // vs: require get_template_directory() . 'related-posts.php';
22.
wp-includes/template-loader.php wp-includes/general-template.php wp-includes/template.php
23.
kovshenin.com/wcsof2013
Download