#26269 closed enhancement (invalid)
register_taxonomy should accept has_archive
Reported by: | mattbeck | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | Taxonomy | Keywords: | needs-patch |
Focuses: | Cc: |
Description
Taxonomies can and should be used by custom themes/plugins to connect posts/pages together.
It's not always desirable to expose this relationship publicly with an archive view, and if overlooked can cause undesired results or content duplication issues in search engine indexes.
Following the same process as registering a custom post type, the register_taxonomy function should accept the has_archive bool.
Change History (6)
#2
@
11 years ago
Taxonomies are not always tied to a specific post type, and they have their own archive pages.
Those archive pages should be disable-able.
Currently if you don't want to expose the taxonomy's archive page, you have to set up a 301 or some such.
#3
@
11 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#5
follow-up:
↓ 6
@
10 years ago
- Milestone Future Release deleted
- Resolution set to invalid
- Status changed from new to closed
The very concept of has_archive
(as it applies to post types) doesn't exist for taxonomies. See #13816. If you want to suppress /tag/foo/ pages, you'll want to evaluate the rewrite
and public
args.
#6
in reply to:
↑ 5
@
10 years ago
Replying to nacin:
The very concept of
has_archive
(as it applies to post types) doesn't exist for taxonomies. See #13816. If you want to suppress /tag/foo/ pages, you'll want to evaluate therewrite
andpublic
args.
Gotcha, that wasn't clear.
Updated the codex to reflect this method.
http://codex.wordpress.org/Function_Reference/register_taxonomy#Example_Private_Taxonomy
What would be the difference with the
has_archive
argument forregister_post_type
calls?