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]
- Changing pagination list class
- How to show a single post on the front page but have normal paging?
- Pagination resolving to first page only
- Aggregate comments, with pagination
- Pagination of RSS2 feed
- Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)
- Problem: ( kriesi ) pagination doesn’t work in homepage [duplicate]
- How to ignore or disable nextpage tag?
- category/category_name pagination 404 error
- Show content only on front page?
- Show next / previous text (button) all the time
- Pagination difficulty using custom query in genesis-based custom theme
- Placing Ads after every 10th Post with Infinite Scroll
- How to implement pagination in backward way eg. first – 20 – 19 – 18 – … – 3 – 2 – 1 – last
- Limit Timber pagination number items
- List all posts by year with pagination
- WordPress wp_link_pages show only next/prev link
- Pass additional parameter in the URL
- Prev and Next link for splitting single post into multiple pages [duplicate]
- Post timeline (pagination with date, not numbers)
- Why do next pages load the same content rather then older articles?
- Nested Pagination
- Pagination stopped working after assigning custom page template to new page (different slug)
- I want to remove numbers from the_posts_pagination function
- Yoast’s rel=“next” & rel=“prev” tag don’t work on static homepage’s paginated pages
- Pagination indication “/page/2/” are removed from url and auto redirect without /page/2/ : 301 redirection
- Using paginate_links() to generate “01, 02, 03, 04” paginations
- How do I fix this ‘Undefined variable:’ debug message?
- Authors list Pagination : result set from $wpdb->get_results()
- WP-PageNavi on Custom page template not working
- Paginated Archives or Loop by Month
- Pagination Not Working on `WP_Query` Archive Page
- How do I make my pagination work?
- How to use custom previous/next link ?
- How to paginate a list of child pages
- Show content based on page number
- Pagination issue in archive.php
- How to use pagination?
- Include a leading zero in pagination
- Pagination not work on page but work on category
- Custom category.php paging shows the same posts
- Break up posts per page in two sections
- Pagination Links showing incorrect previous page number
- Pagination issue with tag.php
- How to limit page pagination… again
- How to remove /page/2/ from home page?
- wordpress custom search page pagination returns 404
- Conditional pagination li’s
- Paginate Links – Mid Size Less Than 2
- Different page template for paginated content?
- tax_query does not work with pagination with custom query (both wp_query and query_posts())
- I am officially missing something about transient posts
- Pagination on WP_User_Query not updating current page
- Pagination for multiple queries merging into one Loop
- paginate_comments_links() not working
- Adding paging to get_posts()
- How to Show Next-Previous Link Only
- WordPress static home page pagination not working
- How to create a WordPress gallery with pagination
- Custom query pagination with php parameter as arg problem
- Broken pagination links on WP 4.9.10 blog pages
- Excluding posts without affecting the number of posts per page
- get_next_posts_page_link adds Inexistent directories
- How to add post page pagination to template part?
- why pagination not working in page template
- Linking images in WordPress Paginated Post
- Pagination adds search query (again)
- Pagination in Archives
- Only show pagination when post count exceeds show post
- How to fix pagination for custom loops?
- Pagination – linking back to base page – Page 1
- pagination for a custom query
- Custom Pagination shows same posts on each page
- Numbered pagination showing all numbers instead of paginated blocks
- Show next and previous page number
- Search pagination link redirecting to a link that doesn’t work with pagination
- Search URL gives 404
- How to paginate query using get_categories()
- Adding pagination to query for custom page
- Main page paginate_links issue
- Pagination in custom loop for custom post type throwing 404 error
- WordPress creating 404s under blog tags
- Removing template part when not on homepage if / else
- Paginate template name
- How to reduce the number of pages in pagination
- foreach pagination
- Always show Next and Previous button in wp_link_pages ?
- Pagination only working on index page not on a template page
- How to make infinite scroll by dividing the content?