Enables custom post type archives that will support both paging and feeds. All fully customizable.
You should go to 'Permalinks' submenu under 'Settings' menu in WordPress admin backend after you update 'URL base' or 'Enabled Custom Post Type Archives' options. This will force WordPress to flush the old rewrite rules and re-generate the new ones that will have the stuff plugin needs in them.
The prefix for URLs that will lead to your post type archives. If you want to access your post types from URL 'http://example.com/{POST_TYPE}' then leave this option blank. If you want to have an URL 'http://example.com/post-type/{POST_TYPE}' then you would put 'post-type' as this options value. And if you want 'http://example.com/some/long/link/to/post/type/{POST_TYPE}' then you would put 'some/long/link/to/post/type' as options value.
This might be a bit hard to understand. If you don't know what it is, then leaving it enabled, probably, is the best option. By default the rewrite slug will be the same as post type name, but you can change it if you like. Please look at these examples:
register_post_type('photo', array(
/* other options */
)); // will have a rewrite slug 'photo'
register_post_type('photo', array(
/* other options */
'rewrite' => array('slug' => 'awesome-photo')
)); // will have a rewrite slug 'awesome-photo'
If you never specify a custom rewrite slug, then I would suggest disabling this option because it will work just fine, because the post type name will be the same as the rewrite slug. Although, if you specify custom rewrite slugs, then enabling this option is what you want, otherwise the URLs will have the post type name in them not post type rewrite slug. I made this choise, because I think (note the 'I think' - I havent tested it...yet), that disabling this option will make the code a bit faster.
You put the title you want to appear in post type archive in here. You can use several variables in this option:
I have so many space variables because WordPress trims variables before saving. Anyway - if you have a post type with name 'Photo', a seperator '»' and 'Title' options value '{POST_TYPE_NAME} {SEP}', then title on 'Photo' post type archive would be 'Photos »'.
If you leave this option blank, then title won't be changed (it will probably be blank).
It's also worth noting that the same variables will be available for the custom - per custom post type - 'Title' options as well. If they are left blank then it will fall back to global 'Title' option.
The template name that will be used to render post type archives. You can use a {POST_TYPE} variable in this name and that will be replaced with current post type. So if this option has a value 'post-type-{POST_TYPE}.php' and you are in 'photo' post type archive, then 'post-type-post.php' template will be used. Templates should live in the root of your theme directory. If you leave this field blank then it will default to '{POST_TYPE}.php'.
Name of the template that will be used if the template that's stored in 'Template Pattern' option won't exist. So if you have 'Template Pattern' option value of '{POST_TYPE}.php', 'Fallback Template' option value of 'fallback.php' and you are in a post type archive for post type 'photo', but 'photo.php' doesn't exist then 'fallback.php' will be used. Template should live in the root of your theme directory. If you leave this field blank, then it defaults to 'index.php'.
That's because the 'automatic-feed-links' support is enabled for your theme. Don't worry - the feed links will be included automatically!
You can only see this option if 'Use Rewrite Slug' option is enabled.
Sadly you can't do it from backend. But! You can do it using the 'pta_add_feed_link' filter! Just return false in it and thats it! Here's an example (put this in themes functions.php file):
function disable_pta_feed_links($add_feed_links) {
return false;
}
add_filter('pta_add_feed_link', 'disable_pta_feed_links');
Just put '/feed/' at the end of your post type archive URL. That's how WordPress will know that you want an RSS feed of that. (it will also support all the other feed types as well, like atom and rdf)
get_the_post_type_permalink function will return the permalink where the_post_type_permalink will echo the link.
You can pass an optional argument for these functions:
If at the end functions can't get the post type slug then will return/echo an empty string.
The functon takes two arguments:
Function will do the same thing as the wp_get_archives function (it even uses the same function to get the data). I had to create a wrapper for that function because WordPress lacked hooks to let me fix the URLs that came out. Basically it it the same function with additional 'post_type' argument so please read the wp_get_archives documentation.
P.S. It might not work properly with 'weekly' archives.
Requires: 3.0 or higher
Compatible up to: 3.2.1
Last Updated: 2011-8-8
Downloads: 16,858
0 of 2 support threads in the last two months have been resolved.
Got something to say? Need help?