#42717 closed defect (bug) (fixed)
get_category_link() accepting object but not id
| Reported by: | belbo | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9.2 |
| Component: | Taxonomy | Version: | 4.9 |
| Severity: | normal | Keywords: | fixed-major |
| Cc: | Focuses: |
Description
I just updated to the latest version of WP and realised that some of my links stopped working. I was using
<?php get_category_link($term->id);
which no longer works, however
<?php get_category_link($term_oject);
Does work. According to the codex both should work :-)
https://developer.wordpress.org/reference/functions/get_category_link/
thanks :-)
Change History (8)
#1
@
9 years ago
Version 0, edited 9 years ago by
(next)
#2
@
9 years ago
- Resolution → invalid
- Status new → closed
term_id is the correct parameter for taxonomy.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@belbo Welcome to Trac!
I think you should try
instead of
Because Term ID field returned as 'term_id' not 'id'.