#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 |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.2 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
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)
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'
.