'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '/page/%#%'?paged=%#%',
in both cases (n=1 and n>1). Therefore, you will get a non empty first page link and the the output of paginate_links()
will be something like:
<ul class='page-numbers'>
<li><a class="prev page-numbers" href="http://example.com/page/2/">« Previous</a></li>
<li><a class='page-numbers' href='http://example.com/page/1/'>1</a></li>
<li><a class='page-numbers' href='http://example.com/page/2/'>2</a></li>
<li><span class='page-numbers current'>3</span></li>
<li><a class='page-numbers' href='http://example.com/page/4/'>4</a></li>
<li><a class='page-numbers' href='http://example.com/page/5/'>5</a></li>
<li><a class='page-numbers' href='http://example.com/page/6/'>6</a></li>
<li><a class="next page-numbers" href="http://example.com/page/4/">Next »</a></li>
</ul>
It should also work if you use:
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '/page/%#%',
To have a non empty first page link it looks like $format
can be any string as long as $base
doesn't include the string "%_%"
, i.e. these should work fine:
'format' => '?paged=%#%',
'format' => 'page/%#%',
'format' => 'asdfasdfasdfasdfasdf',
If you don't use permalinks, then the example in (#) will also give you non empty first page link since
$link = str_replace('%_%', 1 == $n ? '' : "?paged=%#%", "http://example.com/?paged=%#%");
with replacements.