Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#34587 closed defect (bug) (wontfix)

the_archive_title and the_archive_description should return multiple terms

Reported by: thomask's profile thomask Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: needs-patch
Focuses: template Cc:

Description

For some time it is possible to use multiple taxonomies in URL to create intersection or join, so
example.com/tag/term_1+term_2 return posts with both terms (AND)
example.com/tag/term_1,term_2 return posts with any of this term (OR)

but the_archive_title (and possible also the_archive_description) print in such cases only the first term. I think, the_archive_title should print Term 1(,|+) Term 2 and the_archive_description should probably return nothing in such cases.

Attachments (1)

Screen Shot 2016-06-26 at 15.02.44.png (81.8 KB) - added by michalzuber 7 years ago.
How we should represent it in text? With word 'or' or , (comma) if more tags are present?

Download all attachments as: .zip

Change History (7)

#1 @obenland
8 years ago

  • Focuses template added
  • Version trunk deleted

#2 @boonebgorges
7 years ago

  • Keywords needs-patch added

We'll need to make sure that the patch here is i18n-friendly. What do we do elsewhere when we need to assemble lists like this?

#3 follow-up: @joostdevalk
7 years ago

The problem here is that we don't "really" support these queries in core. The WP_Query object only has 1 tag ID for instance when you query two tags... So that'd need fixing before you could fix this properly... My feeling is: we probably shouldn't do anything about that, but I might be wrong :)

This ticket was mentioned in Slack in #core by joostdevalk. View the logs.


7 years ago

#5 in reply to: ↑ 3 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Replying to joostdevalk:

The problem here is that we don't "really" support these queries in core.

Right, both functions rely on get_queried_object(), which can only contain one object at a time.

#6 @SergeyBiryukov
7 years ago

  • Summary changed from the_archive_tile and the_archive_description should return multiple terms to the_archive_title and the_archive_description should return multiple terms

@michalzuber
7 years ago

How we should represent it in text? With word 'or' or , (comma) if more tags are present?

Note: See TracTickets for help on using tickets.