Opened 4 years ago
Closed 4 years ago
#11179 closed defect (bug) (fixed)
get_term_link returns a bad link for custom taxonomies
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9 |
| Component: | Taxonomy | Version: | 2.8.5 |
| Severity: | normal | Keywords: | |
| Cc: | bookchiq |
Description
When I create a list of custom taxonomy members in the Loop using get_the_term_list, the links that are created are missing a slash.
I've tracked this back to the get_term_link function, specifically the following line:
$termlink = get_option('home') . user_trailingslashit($termlink, 'category');
As best I can figure, this should read:
$termlink = get_option('home') . '/' . user_trailingslashit($termlink, 'category');
More details on how this shows up...
- My base URL: http://192.168.2.99/wp
- The taxonomy I'm testing: colors
- The term I'm testing: brown
- The bad URL produced by get_term_link: http://192.168.2.99/wpcolors/brown
- The URL that should be produced: http://192.168.2.99/wp/colors/brown
Change History (3)
Note: See
TracTickets for help on using
tickets.

Further testing reveals this to only be an issue when using the default (non-pretty) permalink settings.