#2982 closed defect (bug) (fixed)
single.php has wrong function and format to show next and/or previous post link.
Reported by: | chestnut_jp | Owned by: | DJPaul |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | 1.5 | |
Component: | Templates | Keywords: | 2nd-opinion |
Cc: |
Description
/bp-themes/bp-default/single.php has a wrong function and format to show the next and/or previous post link.
[ Original ]
<div class="alignleft"><?php next_posts_link( ( '← Previous Entries', 'buddypress' ) ) ?></div>
<div class="alignright"><?php previous_posts_link( ( 'Next Entries →', 'buddypress' ) ) ?></div>
Should be
[ Changed to ]
<div class="alignleft"><?php next_post_link('%link', ( '← Previous Entries', 'buddypress' ) ) ?></div>
<div class="alignright"><?php previous_post_link('%link', ( 'Next Entries →', 'buddypress' ) ) ?></div>
However, this still will collapse the format of page, thus I recommend:
[ Changed to ]
<table>
<tr><td class="alignleft">
<?php previous_post_link('%link', '← %title') ?>
</td><td class="alignright">
<?php next_post_link('%link', '%title →') ?>
</td></tr>
</table>
Note that %title can be changed to the default of "( '← Previous Entries', 'buddypress' )" and "( 'Next Entries →', 'buddypress' )"
Attachments (2)
Change History (8)
#1
@
14 years ago
- Milestone changed from Awaiting Review to 1.3
- Owner set to DJPaul
- Status changed from new to assigned
#3
@
14 years ago
Css for next / prev links
.meta-nav-item-options {
width: 100%;
margin-bottom: 15px;
display: inline-block;
}
#4
@
14 years ago
- Keywords 2nd-opinion added
Screenshot looks okay to me, thanks modemlooper. What do others think?
Not using a table for this as it is a semantically inappropriate element. I also think it's a bad idea to add this at the very top of the page (i.e. where it is already, if it worked) as it pushes down the entire post. That position works on archive pages as the format of the page is very different, and you're not expecting a headline.
Does anyone have a good idea about where we can put these links in?