| 开发者 |
jakemgold
thinkoomph |
|---|---|
| 更新时间 | 2011年3月26日 05:59 |
| 捐献地址: | 去捐款 |
| PHP版本: | 3.0 及以上 |
| WordPress版本: | 3.0.1 |
yourblog.com/(custom-post-type-name) - including paging (/page/2/) and feedS (/feed/)type-(custom-post-type-name).php (or post type slug) and type.phpcustom-post-type-archive and custom-post-type-(post-type-name)-archiveis_home conditional check on custom post type archives (incorrectly reports true by default)is_custom_post_type_archive for use in your themes: can optionally be passed name of post type/wp-content/plugins/ directorytype-(custom-post-type-name).php (may also use slug) and / or type.php template files in theme, if desiredFirst, make certain the custom post type is supported by the plug-in. This plug-in will only add archive permalink for non-hierarchical, public custom post types that have a "slug." There's plenty of documentation on register_post_type if you need help verifying that. If you're certain it's a supported post type archive, try going to Settings > Permalinks, and just hit "save" to refresh the permalink settings and cache. If that doesn't work, try getting in touch on our support page.
Manually. Any number of ways, like a "Custom Links" menu item using the new nav menus, manually adding a link in your theme, or (if you're clever) even fetching the post type objects that meet the requirements using some API jujitsu. I'm going to try and add a new meta box to the "Menus" manager that allows easy adding of custom post types. I got about 75% of the way there already, but there's a lot going on in that API that I still have to wrap my head around! In the mean time, consider using the body class as a work around.
/(post-type-name)/feed/type-(slug).php in addition to type-(name).php template files (confused many users)is_custom_post_type_archive function can now be passed a name of a post type to check againstlocate_template function)