WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#20081 closed defect (bug) (invalid)

Custom Post Type/Custom Taxonomy Does not filter.

Reported by: DennisSmolek Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: General Keywords: reporter-feedback
Focuses: Cc:
PR Number:

Description

I have tested this on 4 different sites and found the same issue. At first I thought it was the code I copied then I realized the issue was happening with core.


Steps to produce:

Use register_post_type to add a post type, say "objects"

Use register_taxonomy to create custom tax, say "attributes"

Be sure to have 'show_ui' => true

Create a post, give it a tax. IE: attribute1

Create a second post, give it a different tax. IE: attribute2

On the menu navigate to your tax menu page

here it will list attribute1 and attribute2.

It will show 1 post in each, and the number 1 is a link to edit.php
where it creates this URL string:
yoursite.com/wp-admin/edit.php?post_type=objects&attribute=attribute1

Expected Result:
The page should now be filtered down to JUST posts that have that attribute.

Actual Result:
All Posts are still visible. Filtering has no effect.

I found this by creating custom columns and with my switch listing links to the Tax's to be filtered. I've never gotten it to work.
I do have a great script I believe by YOAST that creates a drop down to filter Tax's but this actually changes the global query itself.

Change History (3)

#1 @solarissmoke
8 years ago

  • Keywords reporter-feedback added

Can't reproduce this - clicking on the numbers as you describe gives me a list of posts limited to that term. What is missing and would be nice is a dropdown to let you change the filter (like there is with the default post categories), but that's a separate issue.

Can you reproduce this issue with ALL plugins disabled?

#2 @DrewAPicture
6 years ago

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

Can't reproduce this either. @DennisSmolek: feel free to reopen if you continue to have a problem.

#3 @SergeyBiryukov
6 years ago

I do have a great script I believe by YOAST that creates a drop down to filter Tax's but this actually changes the global query itself.

Looks like the script caused the issue here, see ticket:24317:5 (#24317 is essentially the same issue).

Note: See TracTickets for help on using tickets.