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. 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. 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. 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' );