Opened 3 years ago
Closed 3 years ago
#13507 closed defect (bug) (invalid)
Conditional tag for post type and taxonomy
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.0 |
| Severity: | normal | Keywords: | reporter-feedback |
| Cc: | westi |
Description
I'm using MAMP on a Mac, and trying to filter posts using conditional tags, but other posts are passing...
| is_taxonomy( 'series' ) ) |
It still doesn't work when I try just:
| is_taxonomy( 'series' ) ) |
I'm running the latest beta. And it is not a problem of wp_reset_query()... I tested without any query before.
Change History (4)
- Cc westi added
- Keywords reporter-feedback added
- Priority changed from high to normal
What intersection are you trying to achieve?
Could you attach some example code with the calls for registering the post_types and taxonomies so we can reproduce.
Cheers
Neither of these are conditional tags. is_taxonomy and is_post_type tell you if it is registered.
For conditional tags, you'll want is_tax, and probably is_singular (we haven't acted on #12588 yet).
- Milestone 3.0 deleted
- Resolution set to invalid
- Status changed from new to closed
Neither of these are conditional tags. is_taxonomy and is_post_type tell you if it is registered.
Correct, Which is why this isn't working as expected.
use is_tax() + and the result from #12588

The codes are: