If you can't read please download the document
Upload
daisyolsen
View
4.619
Download
0
Embed Size (px)
DESCRIPTION
WordPress Theme Basics. Presented by Daisy Olsen at WordCamp NYC on November 14, 2009.
Citation preview
2. Stylesheet Heading /* Theme Name: Origins Theme Theme URI: http://wpmama.com/origins-theme Description: A blank theme Version: 1.0 Author: Daisy Olsen Author URI:http://wpmama.com/ Template: origins (for use when creating a child theme) Tags: blank, empty, minimal */ 3. Importing other Stylesheets @import url(css/reset.css); 4. The Simplest Index.php file 5. The Loop Stuff to display for each Post Stuff to display if no posts are returned by the have_posts() function 6. Extending Your Theme
7. Include Tags 8. Template Tags 9. API Hooks 10. Filter Hooks 11. Include Tags Used within a Template file to execute code found in another template file
12. get_footer(); /* footer.php */ 13. get_sidebar(); /* sidebar.php */ 14. get_search_form();/*searchform.php*/ 15. comments_template();/*coments.php */ 16. Include( TEMPLATEPATH . '/header2.php'); 17. Include( STYLESHEETPATH . '/header2.php'); 18. Template Files
19. index.php 20. header.php 21. footer.php 22. sidebar.php 23. comments.php 24. functions.php
25. single.php 26. page.php 27. search.php 28. searchform.php 29. 404.php 30. Page Templates 31. Template Tags
32. Parameters can be passed in template tags 33. A Basic Template Tag Function
34. Basic API Hooks
wp_head ();
wp_footer();
comment_form(); 35. Filter Hook Modify Core Function Behavior
add_filter( 'the_content_more_link', 'my_more_link', 10, 2 ); function my_more_link( $more_link, $more_link_text ) { return str_replace( $more_link_text, 'Continue reading ', $more_link ); } 36. Functions.php
37. Additional code placed here 38. Can extend functionality of a theme to include anything that a plugin can do. 39. Look at a Working Theme 40. Questions? Daisy Olsen wpmama.com @DaisyOlsen