Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
THINGS YOU CAN LEARN
FROM 2014 THEME
ABOUT ME
• Tran Ngoc Tuan Anh (a.k.a. Rilwis)
• FitWP (From Ideas To WordPress) – http://fitwp.com
• Deluxe Blog Tips – ht...
FEATURED CONTENT
o Using tag: “featured”

o Display types: “grid” or “slider”
o Customizer

WHY IT SUCKS?
Tag is not a goo...
FEATURED CONTENT
Same markup for “grid” and “slider” layout
Using theme mod

<?php
// Output the featured image.
if ( has_...
ENQUEUE SCRIPTS & STYLES
Get URL for Google Font
wp_enqueue_style( lato', twentyfourteen_font_url(), array(), null );
// I...
HEADER IMAGE
<?php if ( get_header_image() ) : ?>
<div id="site-header">
<a href="<?php echo esc_url( home_url( '/' ) ); ?...
SMALL THINGS
the_title( '<h1 class="entry-title">', '</h1>' );

add_theme_support( 'html5', array(
'search-form', 'comment...
THANKS
Upcoming SlideShare
Loading in …5
×

Things you can learn from 2014 WordPress theme

3,766 views

Published on

This slide shows you some things (mostly features and coding highlights) that you can learn from the new WordPress default theme: 2014.

Published in: Technology, Business
  • Be the first to comment

Things you can learn from 2014 WordPress theme

  1. 1. THINGS YOU CAN LEARN FROM 2014 THEME
  2. 2. ABOUT ME • Tran Ngoc Tuan Anh (a.k.a. Rilwis) • FitWP (From Ideas To WordPress) – http://fitwp.com • Deluxe Blog Tips – http://deluxeblogtips.com • Hanoi WordPress Meetup Co-Organizer – http://meetup.com/hanoiwordpress rilwis rilwis
  3. 3. FEATURED CONTENT o Using tag: “featured” o Display types: “grid” or “slider” o Customizer WHY IT SUCKS? Tag is not a good idea It’s not new Using “modified” version of Flexslider
  4. 4. FEATURED CONTENT Same markup for “grid” and “slider” layout Using theme mod <?php // Output the featured image. if ( has_post_thumbnail() ) : if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) { the_post_thumbnail(); } else { the_post_thumbnail( 'twentyfourteen-full-width' ); } endif; ?>
  5. 5. ENQUEUE SCRIPTS & STYLES Get URL for Google Font wp_enqueue_style( lato', twentyfourteen_font_url(), array(), null ); // Inside twentyfourteen_font_url() $font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" ); Enqueue styles for IE wp_enqueue_style( 'ie', get_template_directory_uri() . '/css/ie.css’ ); wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' );
  6. 6. HEADER IMAGE <?php if ( get_header_image() ) : ?> <div id="site-header"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt=""> </a> </div> <?php endif; ?>
  7. 7. SMALL THINGS the_title( '<h1 class="entry-title">', '</h1>' ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', ) ); add_theme_support( 'featured-content', array( 'featured_content_filter' => 'twentyfourteen_get_featured_posts', 'max_posts' => 6, ) );
  8. 8. THANKS

×