WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9352 closed defect (bug) (duplicate)

Can't view category archive for category with stub of "0"

Reported by: Viper007Bond Owned by:
Milestone: Priority: lowest
Severity: minor Version: 2.8
Component: Template Keywords: needs-patch
Focuses: Cc:

Description

Make a category with the stub of "0" and assign a post to it. If you view the archive listing for that category, index.php is used rather than archive.php.

Change History (6)

comment:1 @Viper007Bond6 years ago

  • Priority changed from normal to lowest
  • Severity changed from normal to minor
  • Summary changed from archive.php template not used for category with "0" as stub to Can't view category archive for category with stub of "0"

Actually, it's not using the wrong template, it's just not detecting that a category archive was requested (it's displaying the overall latest posts).

comment:2 @Viper007Bond6 years ago

This of course requires pretty permalinks to be enabled, otherwise the URL is /?cat=123.

comment:3 @Viper007Bond6 years ago

The query variable category_name isn't being set, but I can't find where in WP_Query it's going wrong. I'll let someone else handle it.

comment:4 @Denis-de-Bernardy6 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

comment:6 @mtekk6 years ago

  • Milestone Unassigned deleted
Note: See TracTickets for help on using tickets.