Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#36997 closed defect (bug) (invalid)

WP_Query Bug

Reported by: vpetrosyan's profile VPETROSYAN Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.2
Component: Query Keywords:
Focuses: Cc:


When There is a taxonomy with slug 'author', using WP_Query( with param author returns wrong sql( because of this code

To reproduce:

  1. register a taxonomy with slug author.
  1. new WP_Query(array('author' => get_current_user_id());

Change History (2)

#1 @usermrpapa
8 years ago

documented in codex are reserved terms:

#2 @boonebgorges
8 years ago

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

Hi @VPETROSYAN - Thanks for the ticket, and welcome to WordPress Trac!

As @usermrpapa, we do not support taxonomies with the name 'author'. For more information, see #9546, #11531, #12929, and other linked tickets.

Note: See TracTickets for help on using tickets.