The function paginate_links() can return “plain”, “list” and “array” (http://codex.wordpress.org/Function_Reference/paginate_links). Just define the type as array then you’ll be to display it as you want:
<?php
global $wp_query;
$big = 999999999; // need an unlikely integer
$paginate_links = paginate_links( array(
'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages,
'prev_text' => __('← Previous'),
'next_text' => __('Next →'),
'type' => 'array'
));
foreach ( $paginate_links as $pgl ) {
echo "[ $pgl ]";
}
?>
Related Posts:
- How do I sort multiples pages?
- Limit number of pages in pagination
- get_query_var(‘paged’) giving same result
- Next & Previous (Pagination in this case) Not Appearing
- Pagination with $_POST and $_SESSION
- Is it possible to have pagination with an offset loop?
- How to get category/tag in URL for Pagination links?
- Can I paginate this get_attachment query?
- Creating a Back button on detail post page to go back to blog page with same query strings and page id
- Pagination not working in custom post page
- paged query leads to 404? [duplicate]
- How to fix pagination for custom loops?
- Pagination not working with custom loop
- Is it possible to paginate posts correctly that are random ordered?
- How to determine if I’m on the first page of pagination?
- Changing pagination list class
- How to determine if theres a next page
- WordPress /page/2 404 pagination problem – what to do?
- Paged posts – how to use numbers and next/previous links?
- Why do you need an unlikely integer in paginating?
- How to display pagination links for WP_User_Query?
- How to show a single post on the front page but have normal paging?
- How to add CSS Class to previous_post_link or get previous/next post link URL
- WordPress Paginate $wpdb->get_results
- Pagination resolving to first page only
- how to get pagination link url?
- add_rewrite_rule – working fine but broken for pagination
- How to get the number of Pages in a single Post Pagination?
- Aggregate comments, with pagination
- post pagination names, not numbers
- How to fix pagination after rewriting url? ie. www.site.com/players/type/pro/page/3/
- How can I make wp-pagenavi work on a custom query built upon a form submission? [closed]
- Display “Page 3 of 5” for a paginated post
- Custom WP_Query order by post_meta and (author) user_meta
- Implementing a general Table of Content across single paginated post pages
- Paginate links with “ugly” and “pretty” permalinks?
- Pagination of RSS2 feed
- Strange paginate_links behavior. First page link is always whatever page I’m on, all other links are correct
- Custom WP_Comment_Query with pagination and orderby?
- Pagination: How do I always show ‘previous’?
- Next/Previous Links in same category
- How To create ajaxed wp-pagenavi?
- Single Page View for Paginated Posts
- How can I see all of a post’s comments on a single page as a reader, if pagination is enabled?
- Using paginate_links() to generate “1, 2, 3 … 10, 20, 30, 40… 55” paginations
- Change class=”page-numbers” in pagination
- Check if on last page of paginated post using wp_link_pages
- Varying the number of posts per page from the first one
- Using pagination with get_posts on page type
- List posts based on first letter of posts
- Pagination for sub-pages
- Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)
- How to get post pagination like this
- How to paginate a list of tags
- Pagination Not Displaying on Custom Term Archive
- Non existing blog pages are not redirected to 404
- posts_per_page & pagination conflict
- How to implement pagination eg. newer – 3 – 4 – 5 – 6 – 7 – older
- Add and in the header while looping over custom query in page template
- Problem: ( kriesi ) pagination doesn’t work in homepage [duplicate]
- Custom loop pagination issue ( pagination not showing up )
- WordPress pagination on custom script
- Combining WordPress pagination functions for archives and search results
- Pagination is not working wp_query custom fields values
- Broken pagination
- Passing custom args in paginate_links
- wordpress Static Page pagination
- Static front page with recent posts pagination
- How to ignore or disable nextpage tag?
- Paginate tags page
- Custom Permalinks Break Search Pagination
- pagenavigation not showing the next page just linking back to the main page [closed]
- Category pagination shows same posts
- How to display next and prev pagination links with WP_User_Query?
- Custom taxonomy list and sortby letter pagination problem
- Paginate a list of users?
- Move pagination numbers above plug-ins
- Custom Page Template for “Older Posts” Pages
- Allow Users to Choose Pagination or Next/Previous (Combine)
- WordPress Pagination not displaying posts after certain page
- wp_link_page – wrap current page element
- category/category_name pagination 404 error
- How to create pagination on archive.php template
- Paginate get related post by author function
- Pagination that includes “view all on one page”
- How to use pre_get_posts?
- Custom page-links for paginated posts | wp_link_pages quicktag
- pagination in author.php template returns 404 error
- Custom paging function
- How to change title tags on paginated posts?
- Transient pagination not working properly
- Broken pagination, need help figuring out why!
- How to grab a specific page of content from paginated post?
- Jetpack plugin – ‘posts_per_page’ not overriding ‘Blog pages show at most’ option, also different values for different post types?
- Pagination with get_posts seems to work but links not showing
- Possible to paginate on single.php?
- Keep Pagination in Tabs
- Show content only on front page?
- paginate_links() outputs extra empty pages on custom loop
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?