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:

Description

When There is a taxonomy with slug 'author', using WP_Query(http://prntscr.com/bbaw7d) with param author returns wrong sql(http://prntscr.com/bbasfr) because of this code http://prntscr.com/bbas3x

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: https://codex.wordpress.org/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.