Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#40644 closed defect (bug) (invalid)

Category filter for custom post type

Reported by: mr.tonyhuynh Owned by:
Priority: normal Milestone:
Component: Administration Version: 4.7.4
Severity: normal Keywords:
Cc: Focuses:

Description

I have a new custom post type called "product".
I attached "category" to that cpt.

<?php
$args = array(
                'public'        => true,
                'has_archive'   => 'true',
                'menu_position' => 6,
                'supports'      => array( 'title', 'thumbnail', 'editor' ),
                'taxonomies'    => array( 'category', 'post_tag ' ),
                'label'         => 'Products',
        );
        register_post_type( 'product', $args );

When I use the filter category (​http://prntscr.com/f3g6vh) ...
It automatically switches to the post type "post" instead "product". (​http://prntscr.com/f3gcou)

And maybe add a field s though I just clicked the filter button but did not click the search submit (empty search field). ​http://prntscr.com/f3gy2y

Change History (2)

#1 @tobifjellner
10 years ago

  • Resolution → invalid
  • Status new → closed

Hi @mr.tonyhuynh and very welcome to WordPress core trac.
This is a place were we track confirmed bugs in WordPress core files.
The topic you're raising here would much better be discussed over at ​https://wordpress.org/support/
If, indeed, you've here found a bug in WordPress core, then feel free to reopen this ticket, but for now I'll mark it as invalid and closed.

#2 @dd32
10 years ago

  • Milestone Awaiting Review

Just to note, that using a very basic CPT with no extra filters it appears to work as intended for me when filtering from the CPT list view.

Note: See TracTickets for help on using tickets.