Opened 10 years ago
Closed 3 years ago
#36654 closed enhancement (wontfix)
New function `has_terms`
| Reported by: | sebastian.pisula | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | has-patch needs-unit-tests reporter-feedback |
| Cc: | Focuses: |
Description
I suggest add new function:
if(has_terms('category')) {
the_terms(x, 'category');
}
Attachments (1)
Change History (5)
#3
@
3 years ago
So after all these years, I don't think that this function is needed.
https://developer.wordpress.org/reference/functions/has_term/
Has_term support as parameter an array, so it is possible to specify multiple terms.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
What is the difference with
has_term?I think that are the same but only with different code approach, instead
has_termshas 3 parameter that add the support for term and not only for taxonomy.