[wp-trac] [WordPress Trac] #16832: Trouble if the slug of a custom taxonomy is the same as the url of page/post
WordPress Trac
noreply at wordpress.org
Tue Sep 30 10:44:05 UTC 2014
#16832: Trouble if the slug of a custom taxonomy is the same as the url of
page/post
---------------------------+------------------------------
Reporter: LucasHantz | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 3.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
---------------------------+------------------------------
Comment (by husobj):
I have been doing some work relating to this but with post type archives.
With post archives, the intended behaviour is currently that if a post
type archive exists at the same URL as a page, then the archive is
displayed. An example of this as expected behaviour is where you set the
'blog' home page in WordPress Reading settings by selecting a page to use
as page for posts (ie post archive page).
I've been working on a plugin that would allows you to set post type
archive URLs based on pages for custom post types (although at present
they need to support it via a filter), and optionally allow you to display
the content from the page with matching URL in the header of the post
archive page above the posts.
Terms current don't have a 'taxonomy' landing page so you can currently
display terms as subpages of a page as mentioned by @scribu.
If adding support for term archive (or taxonomy) pages, i would suggest
they follow a similar principle to post types:
- register_taxonomy() would have a 'has_archive' parameter.
- any rewrite rules would supercede pages rules so a term archive would
be displayed rather than an existing page.
Just my thoughts... :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/16832#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list