#14161 closed enhancement (fixed)
Taxonomy Titles
Reported by: | ramiy | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | low |
Severity: | normal | Version: | 3.0 |
Component: | Template | Keywords: | has-patch |
Focuses: | Cc: |
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)
#3
in reply to:
↑ 2
@
14 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!
#4
@
14 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().
#5
@
14 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
#8
follow-up:
↓ 9
@
14 years ago
ramiy, your patch introduces single_term_title(), but it doesn't use it anywhere in Core, like in single_tag_title().
#9
in reply to:
↑ 8
@
14 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.
#10
follow-up:
↓ 11
@
14 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().
#11
in reply to:
↑ 10
@
14 years ago
scribu, i think you right, but i will need your help with the code.
#12
@
14 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.
#13
@
14 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
#15
@
14 years ago
wp 3.1 is planned for late 2010/early 2011. can you change the milestone to 3.0.1 ?
#16
@
14 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).
#17
@
14 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.
#18
@
14 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(...) { ... }
Wouldn't it be a lot easier, and simplier to just have
term_description()
andsingle_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...!