#35163 closed defect (bug) (worksforme)
wp_get_archives() returns unresolved query string
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
wp_get_archives() function returns unresolved query string.
such as
http://example.com/archives/test/date/2015/12?post_type=test // called wp_get_archives('post_type=test&type=monthly')
Looks duplicate query parse filter or add_query_arg() not working.
refs #21596
Attachments (1)
Change History (5)
This ticket was mentioned in Slack in #core by noisysocks. View the logs.
4 years ago
Note: See
TracTickets for help on using
tickets.
It looks to me that this is working as expected.
The archives that the function deals with, are all post-specific.
Another example:
wp_get_archives('post_type=page&type=monthly' );
will generate links like this:
Those URLs will 404 unless the
post_type
specified has also been included into the global posts loops through apre_get_posts
filter.It feels like the original report here had other filters in use which were adding the post_type into the URI, potentially the
month_link
filter or from within$wp_rewrite->get_month_permastruct()
.I'm going to close this as
worksforme
, since it seems correct. If you're experiencing this issue, please feel free to re-open with specifics on how to reproduce on a clean environment without other filters.