Thord Daniel Hedengren - Smashing WordPress_ Beyond the Blog-Wiley (2014)
CHAPTER 4 • WordPress Theme Essentials 85 // Nothing in the loop? else : ?> Nothing Found We're sorry, but we couldn't fin ...
86 PART II • Designing and Developing WordPress Themes in the Gallery post format, the code will look for content-gallery.php fi ...
CHAPTER 4 • WordPress Theme Essentials 87 Posted on ...
88 PART II • Designing and Developing WordPress Themes // Comments comments_template( '', true ); // Loop ends endwhile; ?> & ...
CHAPTER 4 • WordPress Theme Essentials 89 instead, but that’s not the case here. In content-single.php, you’ll wrap the post met ...
90 PART II • Designing and Developing WordPress Themes </div> <?php // Go back return; endif; // Looking for comments i ...
CHAPTER 4 • WordPress Theme Essentials 91 comment_form(); ?> The comments within the code should help you along. What’s impo ...
92 PART II • Designing and Developing WordPress Themes </header> <?php // Start the loop while ( have_posts() ) : the_p ...
CHAPTER 4 • WordPress Theme Essentials 93 <?php get_sidebar(); ?> <?php get_footer(); ?> Basically, it’s a simple t ...
94 PART II • Designing and Developing WordPress Themes // Theme setup add_action( 'after_setup_theme', 'simpleblog_themesetup' ) ...
CHAPTER 4 • WordPress Theme Essentials 95 oEmbed feature will go with when you’re embedding media using oEmbed, such as YouTube ...
96 PART II • Designing and Developing WordPress Themes UNDERSTANDING TEMPLATE FILES A theme consists of template files, at least ...
CHAPTER 4 • WordPress Theme Essentials 97 ◾ Custom taxonomy archives: taxonomy-X-Y.php where X is the taxonomy slug and Y is the ...
98 PART II • Designing and Developing WordPress Themes Figure 4-8: The hierarchy of template files. PAGE TEMPLATES WordPress Pag ...
CHAPTER 4 • WordPress Theme Essentials 99 The preceding template, for example, could be named mypagetemplate.php. It may be a go ...
100 PART II • Designing and Developing WordPress Themes // The archives wp_get_archives( $args ); ?> </ul> <h2>Br ...
CHAPTER 4 • WordPress Theme Essentials 101 Putting Page templates to good use is a huge step toward creating the site you want u ...
102 PART II • Designing and Developing WordPress Themes Figure 4-9: The Media Settings in the WordPress admin isn’t the only way ...
CHAPTER 4 • WordPress Theme Essentials 103 Say you want to encourage your readers to subscribe to your RSS feed. You want to out ...
104 PART II • Designing and Developing WordPress Themes return $content; } add_filter ( 'the_content', 'Promotion' ); The functi ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf