4. Child Themes
• Separate template folder than parent theme
• Uses parent theme files unless overridden
• Must have a style.css file
/*
Theme Name: awesome
Theme URI: http: //beedragon.com/
Description: awesome child theme for twentyten
Author: Lori B
Author URI: http: //lbnuke.com/
Template: twentyten
Version: 1.0
*/
@import url('../twentyten/style.css'); /* import parent styles */
Parent themes: twentyten, Thematic, Hybrid, Genesis*, Thesis*
( * Commercial Theme )
5. Include Tags
Work like PHP include() statements
• <?php get_header(); ?> Includes header.php
• <?php get_sidebar(); ?> Includes sidebar.php
• <?php get_footer(); ?> Includes footer.php
• <?php get_search_form() ?> Includes searchform.php
• <?php comments_template(); ?> Includes comments.php
6. Conditional Tags
• is_home() Main blog page
• is_front_page() Front page from Settings > Reading
• is_single() Single post page
• is_sticky() Returns true if sticky box is checked
• is_page() A "page" page
• is_category() Category archive page
• is_author() Author page
• is_404() HTTP 404: Not Found error page
7. Tag Parameters
For template tags, conditional
tags, include tags, etc.
Examples:
is_page( '19' ) Page with ID 19
is_page( 'about' ) About page (slug)
is_page( 'About Me' ) About page (post title)
is_page ( array( 19, 'about', 'Contact Us' ) )
Returns true when displayed page is either post ID 19
OR post_name "about-me" OR post_title "Contact Us"
12. query_posts();
Query the WP database for pet posts:
Before the Loop: query_posts( 'post_type = pets' );
The query_posts function is intended to be used to
modify the main page Loop only.