#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: | Marko-M | Owned by: | lancewillett |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Bundled Theme | Version: | 3.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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)
#4
@
14 years ago
- Keywords has-patch added
In 20922.diff: Show categories and tags only when supported by post type.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
What we should probably use instead is
is_object_in_taxonomy( get_post_type(), 'post_tag' )and'category'.