#14161 closed enhancement (fixed)
Taxonomy Titles
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 3.1 |
| Component: | Template | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | r_a_m_i@…, kevinB |
Description
in category.php we use the category_description() and single_cat_title() functions.
in tag.php we use the tag_description() and single_tag_title() functions.
in taxonomy.php we use term_description() function BUT the is no title function.
Attachments (2)
Change History (26)
comment:1
markmcwilliams
— 3 years ago
comment:2
follow-up:
↓ 3
nacin
— 3 years ago
Indeed, term_description() is used by both category_ and tag_.
comment:3
in reply to:
↑ 2
markmcwilliams
— 3 years ago
Replying to nacin:
Indeed, term_description() is used by both category_ and tag_.
On a closer inspection (well actually I found the right PHP file to look at) I can see that they both use term_description() like you say!
comment:4
ramiy
— 3 years ago
Yes, both category_description() and tag_description() use the main term_description() function. I think cat/tag functions were not deleted for backwards compatibility.
We need to do the same with single_term_title().
comment:5
scribu
— 3 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Priority changed from normal to low
- Severity changed from major to normal
comment:8
follow-up:
↓ 9
scribu
— 3 years ago
ramiy, your patch introduces single_term_title(), but it doesn't use it anywhere in Core, like in single_tag_title().
comment:9
in reply to:
↑ 8
ramiy
— 3 years ago
Replying to scribu:
ramiy, your patch introduces single_term_title(), but it doesn't use it anywhere in Core, like in single_tag_title().
WP v3.0 introduced taxonomy-{taxonomy}-{term}.php template file. i need it for my theme to show the taxonomy title.
We can add the taxonomy.php file to "Twenty Ten" theme for better suport of custom taxonomies.
comment:10
follow-up:
↓ 11
scribu
— 3 years ago
- Keywords changed from has-patch, dev-feedback to has-patch dev-feedback
No, I thought single_term_title() could be used in single_tag_title(), in the same way term_description() is used in tag_description().
comment:11
in reply to:
↑ 10
ramiy
— 3 years ago
scribu, i think you right, but i will need your help with the code.
comment:12
ramiy
— 3 years ago
scribu, see also the wp_title() function. it uses single_cat_title() and single_tag_title(). we need to insert the new single_term_title() to wp_title() when taxonomy archive is being used.
comment:13
scribu
— 3 years ago
- Component changed from Taxonomy to Template
- Keywords dev-feedback removed
- Milestone changed from Future Release to 3.1
No, I thought single_term_title() could be used in single_tag_title(), in the same way term_description() is used in tag_description().
scribu, see also the wp_title() function. it uses single_cat_title() and single_tag_title(). we need to insert the new single_term_title() to wp_title() when taxonomy archive is being used.
Done and done. See 14161.2.patch
comment:14
ramiy
— 3 years ago
looks good.
comment:15
ramiy
— 3 years ago
wp 3.1 is planned for late 2010/early 2011. can you change the milestone to 3.0.1 ?
comment:16
scribu
— 3 years ago
WP 3.0.1 is only for security fixes or blockers (bugs that would have blocked 3.0 from shipping, if they were known).
comment:17
ramiy
— 3 years ago
But without the single_term_title() function we can't insert titles to taxonomy.php tamplate file (or to archive.php).
We forgot to deal this issue in v3.0 and users that use custom taxonomies can't wait another 6 monts for v3.1, especially when there is a working solution.
Please, add this to 3.0.1.
comment:18
scribu
— 3 years ago
Support for custom taxonomies was introduced way back in WP 2.8 and I haven't heard any complaints about a lack of single_term_title() until this ticket.
Anyway, until WP 3.1, users can just add this to their functions.php file:
if ( !function_exists('single_term_title') ) :
function single_term_title(...) {
...
}
comment:19
scribu
— 3 years ago
Forgot an endif; at the end.
comment:20
follow-up:
↓ 21
ramiy
— 3 years ago
taxonomy.php tamplate files where introduced in WP 3.0.
comment:21
in reply to:
↑ 20
nacin
— 3 years ago
comment:22
ramiy
— 3 years ago
ok. 3.1 it is.
comment:23
scribu
— 3 years ago
- Resolution set to fixed
- Status changed from new to closed
Wouldn't it be a lot easier, and simplier to just have term_description() and single_term_title() if anything and an option to state which (if any) term we are talking about? :) It would make a lot more logic to me...!