More Related Content Similar to What's New in WordPress 3.0 (for developers) (20) More from Stephanie Leary (15) What's New in WordPress 3.0 (for developers)3. Theme Functions
• the_shortlink()
• get_template_part()
• comment_form()
• wp_nav_menu()
4. the_shortlink()
• This is the short link.
• http://blog.example.com/?p=123
• http://wp.me/pZhYe-nl
• wp_get_shortlink()
6. comment_form()
• Replaces the entire <form>
contents
• Markup and labels can be changed
using $args array
7. wp_nav_menu()
• wp_nav_menu("menu=Main");
• wp_nav_menu("fallback_cb=wp_list_
categories");
• in functions.php:
add_theme_support("nav_menus");
9. New Theme Files
• single-content-type.php
• author.php
• author-id.php
• author-nickname.php
• category-slug.php
10. Custom Post Types
• register_post_type(
‘course’,
array(
‘labels‘ = array(
‘name‘ => ‘Courses’,
‘singular_name‘ =>
‘Courses‘
)
)
12. Custom Post Feeds
• /?feed=rss2&post_type=course
• /feed/?post_type=course
• /feed/?post_type=post,page,course
18. Definining
Taxonomies
• register_taxonomy(
‘college’,
array(‘course’, ‘post’),
);
20. Feeds
• /college/science/feed
• /college/science/feed/atom
• /?feed=rss2&college=science
21. Gotchas
• Archives are defined for terms, but
not for the taxonomy itself (404)
• Hierarchical taxonomy URLs are not
built like categories
(/parent/child)
22. Permalinks
• http://dd32.id.au/files/wordpress/
example-hierarchical-term-
links.php
32. Gotchas
• Main site archives move to /blog
• Upload buttons disappear
• Themes must be network-enabled
• Plugins & apps not made for multi:
• XML Sitemaps
• iPhone app
37. Things That Went Away
• Option for global tags
• Miscellaneous Settings page
• importers (plugins)
Editor's Notes
Arguments are: fields, comment_field, must_log_in, logged_in_as, comment_notes_before, comment_notes_after, id_form, id_submit, title_reply, title_reply_to, cancel_reply_link, label_submit
This is a simple example. You can also specify which features your post type should support: title, editor, excerpt, revisions, post author, categories/tags/other taxonomies