Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 8 years ago

#3068 closed defect (bug) (fixed)

single.php creates empty span when no tags are present

Reported by: modemlooper's profile modemlooper Owned by: djpaul's profile DJPaul
Milestone: 1.5 Priority: normal
Severity: Version: 1.5
Component: Templates Keywords: tags
Cc:

Description

This came up on a child theme review. Suggested change. Or is there a better way?

<p class="postmetadata">
<?php the_tags( ('<span class="tags">', 'Tags: ', 'buddypress' ), ', ', '<br />', '</span>'); ?>
<span class="comments"><?php comments_popup_link(
( 'No Comments &#187;', 'buddypress' ), ( '1 Comment &#187;', 'buddypress' ), ( '% Comments &#187;', 'buddypress' ) ); ?></span>
</p>

Change History (6)

#1 @modemlooper
13 years ago

That would work but I think there is a better way using before =>

<p class="postmetadata">
<?php the_tags( ('<span class="tags">Tags: ', 'buddypress' ), ', ', '<br />'); ?></span>
<span class="comments"><?php comments_popup_link( ( 'No Comments &#187;', 'buddypress' ), ( '1 Comment &#187;', 'buddypress' ), ( '% Comments &#187;', 'buddypress' ) ); ?></span>
</p>

#2 @DJPaul
13 years ago

Is this still current?

#3 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to 1.3
  • Owner set to DJPaul
  • Status changed from new to assigned

#4 @DJPaul
13 years ago

I've taken the <br> out too, I can't understand what it was meant to do.

#5 @djpaul
13 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4313]) Don't show empty <span> on posts if they have no tags. Fixes #3068, props modemlooper

#6 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.