#3068 closed defect (bug) (fixed)
single.php creates empty span when no tags are present
| Reported by: | modemlooper | Owned by: | DJPaul |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5 |
| Component: | Templates | Version: | 1.5 |
| Severity: | 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 »', 'buddypress' ), ( '1 Comment »', 'buddypress' ), ( '% Comments »', 'buddypress' ) ); ?></span>
</p>
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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 »', 'buddypress' ), ( '1 Comment »', 'buddypress' ), ( '% Comments »', 'buddypress' ) ); ?></span>
</p>