[wp-trac] [WordPress Trac] #19031: Category view incorrectly counting custom posts
WordPress Trac
noreply at wordpress.org
Sun Feb 24 11:58:14 UTC 2013
#19031: Category view incorrectly counting custom posts
----------------------------+------------------------------
Reporter: fireproofsocks | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Types | Version: 3.2.1
Severity: normal | Resolution:
Keywords: |
----------------------------+------------------------------
Changes (by SergeyBiryukov):
* component: General => Post Types
Old description:
> If you define a custom post-type something like this:
>
> {{{
> Array
> (
> [taxonomies] => Array
> (
> [0] => category
> [1] => post_tag
> )
>
> [label] => Book
> [rewrite_slug] =>
> [query_var] =>
> [public] =>
> [show_ui] => 1
> [show_in_nav_menus] => 1
> [publicly_queryable] =>
> [exclude_from_search] => 1
> )
> }}}
>
> Even if the post-type is NOT public or NOT publicly_queriable (see
> above), the counts of the posts in each category still shows, totally
> ignoring the settings of the post-type.
>
> == Expected Output ==
>
> I would expect the count to be related to the results displayed. If
> there are no visible results for that category (i.e. the user can't see
> them due to public settings), I would expect the count to go to zero.
>
> == Actual Output ==
>
> The count of posts in the given category seems to have nothing to do with
> the visible results.
>
> This is related to this bug:
> http://core.trac.wordpress.org/ticket/18950
New description:
If you define a custom post-type something like this:
{{{
Array
(
[taxonomies] => Array
(
[0] => category
[1] => post_tag
)
[label] => Book
[rewrite_slug] =>
[query_var] =>
[public] =>
[show_ui] => 1
[show_in_nav_menus] => 1
[publicly_queryable] =>
[exclude_from_search] => 1
)
}}}
Even if the post-type is NOT public or NOT publicly_queriable (see above),
the counts of the posts in each category still shows, totally ignoring the
settings of the post-type.
== Expected Output ==
I would expect the count to be related to the results displayed. If there
are no visible results for that category (i.e. the user can't see them due
to public settings), I would expect the count to go to zero.
== Actual Output ==
The count of posts in the given category seems to have nothing to do with
the visible results.
This is related to this bug: #18950
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19031#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list