With this WP code below:
echo paginate_links(array(
'base' => get_pagenum_link(1) . '%_%',
'format' => '/page/%#%',
'current' => $current_page,
'total' => $total_pages,
'prev_text' => __('«'),
'next_text' => __('»'),
));
I will get this HTML:
<span class='page-numbers current'>1</span>
<a class='page-numbers' href='http://xxx/page/2'>2</a>
<a class='page-numbers' href='http://xxxx/page/3'>3</a>
<a class="next page-numbers" href="http://xxx/page/2">»</a>
But how can I customise it so I can get:
<nav>
<ul class="pagination">
<li>
<a href="#" aria-label="Previous">
<span aria-hidden="true">«</span>
</a>
</li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li>
<a href="#" aria-label="Next">
<span aria-hidden="true">»</span>
</a>
</li>
</ul>
</nav>
Any ideas?
Although this method doesn't work just by passing the arguments but can be tweaked to match your requirement.
On your functions.phpNow you can simply call
news_paging_nav()
where you want to display pagination links.