Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#40644 closed defect (bug) (invalid)

Category filter for custom post type

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

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
7 years ago

  • Resolution set to invalid
  • Status changed from new to 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
7 years ago

  • Milestone Awaiting Review deleted

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.