Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#4506 closed defect (bug) (fixed)

"Posts Tagged xxx" In Archives In Default Theme Doesn't Show Tag Name

Reported by: Viper007Bond Owned by: pishmishy
Priority: high Milestone: 2.3
Component: Template Version: 2.3
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Click a tag under a post. The tag is missing from the title.

Posts Tagged ‘’

Simply put, single_cat_title() isn't outputting the tag name.

Attachments (4)

general-template.php.patch​ (501 bytes ) - added by pishmishy 19 years ago.
Adds single_tag_title function
archive.php.patch​ (867 bytes ) - added by pishmishy 19 years ago.
uses new function in default theme
taxonomy.php.patch​ (439 bytes ) - added by pishmishy 19 years ago.
general-template.php.diff​ (914 bytes ) - added by gdevlugt 19 years ago.

Download all attachments as: .zip

Change History (11)

#1 follow-ups: @pishmishy
19 years ago

I think the problem is that single_cat_title() is meant to output the tag name.

#2 in reply to: ↑ 1 @pishmishy
19 years ago

Replying to pishmishy:

I think the problem is that single_cat_title() is meant to output the tag name.

Sorry that really wasn't clear. What I meant is that single_cat_title() isn't meant to output the tag name and there probably should be an equivalent single_cat_title().

@pishmishy
19 years ago

uses new function in default theme

#3 @pishmishy
19 years ago

  • Keywords has-patch added; needs-patch removed

I ran into problems writing the single_tag_title() function. I'm not entirely sure what purpose

$value = sanitize_title($field);

served in taxonomy.php and it appeared to me to break that particular function when searching based on a slug.

#4 @pishmishy
19 years ago

  • Owner changed from anonymous to pishmishy
  • Status new → assigned

#5 @gdevlugt
19 years ago

I added a patch for the single_cat_title() function in wp-includes/general-template.php.

I haven't tested it fully but it seems to work.

#6 in reply to: ↑ 1 @Viper007Bond
19 years ago

Replying to pishmishy:

I think the problem is that single_cat_title() is meant to output the tag name.

Hmm, guess it'd help if I noticed that 'cat' != 'tag', huh? D'oh.

#7 @ryan
19 years ago

  • Resolution → fixed
  • Status assigned → closed

(In [6074]) Set tag_id to first tag in multi tag queries. Have single_cat_title() fallback to single_tag_title() if is_tag so that existing category templates will work with tags. fixes #4506

Note: See TracTickets for help on using tickets.