WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 14 months ago

#10203 new enhancement

posts_nav_link ignoring blank function parameters

Reported by: milanmk Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.8
Component: Posts, Post Types Keywords: posts_nav_link
Focuses: template Cc:

Description

posts_nav_link shows both next and previous links including link seperator even though the respective function parameters are blank.

<div id="page-nav-prev"><?php posts_nav_link('', '&#171; Previous Page', '') ?></div>
<div id="page-nav-next"><?php posts_nav_link('', '', 'Next Page &#187;') ?></div>

Change History (5)

comment:1 @Denis-de-Bernardy6 years ago

  • Component changed from General to Template
  • Milestone changed from Unassigned to Future Release
  • Type changed from defect (bug) to enhancement

see #10204

comment:2 @milanmk6 years ago

  • Cc milanmk@… added

comment:3 @jeremyclark136 years ago

A workaround for now is to set the paramaters to a blank space.

<?php posts_nav_link(' ',' ','&laquo; Older Entries') ?>
<?php posts_nav_link(' ','Newer Entries &raquo;',' ') ?>

comment:4 @chollaball4 years ago

Issue still occurs in v 3.0. Did not occur in v 2.7. I would classify as a bug not an enhancement since it used to work. Workaround as described above is still valid.

comment:5 @nacin14 months ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added
Note: See TracTickets for help on using tickets.