#42717 closed defect (bug) (fixed)
get_category_link() accepting object but not id
Reported by: | belbo | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.9.2 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Taxonomy | Keywords: | fixed-major |
Focuses: | Cc: |
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)
#2
@
7 years ago
- Resolution set to invalid
- Status changed from new to closed
term_id
is the correct parameter for taxonomy.
#5
@
7 years ago
- Component changed from General to Taxonomy
- Milestone set to 4.9.2
- Resolution invalid deleted
- Status changed from closed to reopened
- Version changed from trunk to 4.9
Reopening so as to be fixed as part of #42771.
Note: See
TracTickets for help on using
tickets.
@belbo Welcome to Trac!
I think you should try
instead of
Because Term ID field returned as 'term_id' not 'id'.