#20922 closed defect (bug) (fixed)
Twenty Eleven hides category and tag text on custom post types being included into loop using 'pre_get_posts' action
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Bundled Theme | Version: | 3.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | knut@…, georgemamadashvili@… |
Description
Twenty Eleven themes custom.php uses 'post' == get_post_type() to hide category and tag text for pages on Search like this:
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> ... <?php endif; // End if 'post' == get_post_type() ?>
This 'if' doesn't hide category and tag text for pages on Search but hides category and tag text on custom post types being included into loop using 'pre_get_posts' action.
Attachments (1)
Change History (7)
- Component changed from General to Bundled Theme
- Version changed from 3.3.2 to 3.2
- Keywords has-patch added
In 20922.diff: Show categories and tags only when supported by post type.
comment:5
lancewillett — 7 months ago
- Owner set to lancewillett
- Resolution set to fixed
- Status changed from new to closed
In [22193]:
comment:6
lancewillett — 7 months ago
- Milestone changed from Awaiting Review to 3.5
Note: See
TracTickets for help on using
tickets.

What we should probably use instead is is_object_in_taxonomy( get_post_type(), 'post_tag' ) and 'category'.