Your pagination links are wrapped in with this tag <p class="pagelinks">
so giving them all the same spacing is easy using CSS like so:
.pagelinks a { margin: 0 5px !important; } /* override other defined margins */
maybe you want them all centered on the page too:
.pagelinks { display:block; text-align:center; }
making the current page number a link to the top of the page – try this in before/after your previous page & next page if statements:
if($page == $pagenow) { // check if current link is current page
$args['pagelink'] = '<a href="#header">%</a>'; // assuming top div has ID "header"
} else {
$args['pagelink'] = '%';
}
Related Posts:
- Paged posts – how to use numbers and next/previous links?
- Single Page View for Paginated Posts
- Check if on last page of paginated post using wp_link_pages
- How to ignore or disable nextpage tag?
- wp_link_page – wrap current page element
- Display only the current page number and another numbered page in pagination
- Insert pagination links – wp_link_pages() – before filters on posts
- WordPress wp_link_pages show only next/prev link
- Post Pagination Customization (wp_link_pages) Editing Navigation
- Adding range to wp_link_pages()
- Limiting number of visible links displayed with wp_link_pages
- Post Pagination Modifications (wp_link_pages)
- How to customize wp_link_pages()?
- Custom wp_link_pages for paginated posts | Next page randomly
- Linking images in WordPress Paginated Post
- WordPress /page/2 404 pagination problem – what to do?
- how to get pagination link url?
- add_rewrite_rule – working fine but broken for pagination
- How to paginate a list of tags
- How do I sort multiples pages?
- WordPress pagination on custom script
- Broken pagination
- pagenavigation not showing the next page just linking back to the main page [closed]
- Paginate get related post by author function
- How to use pre_get_posts?
- Keep Pagination in Tabs
- Need help understanding pagination parameters
- redirect pages with no content, instead of 404 error, using max_num_posts?
- Custom query in archive.php with pagination nightmare
- Display post links under month in paginated archive
- Pagination (page/2/) displaying 404 on archive pages
- How to use “offset” to paginate get_users?
- Limited number of paging to 10 “pages: 1 … 10”
- remove_query_arg() on rewrite rule
- Hide featured post on second page
- I cannot get pagination to work on my home page code. it keeps displaying the same posts
- Fetching more posts in WordPress via AJAX
- AJAX pagination offset returns same post on adjacent pages
- 404 on pagination but with a strange twist (error 404 only when there is single post on the second page)
- Add additional first page, last page links to the_posts_pagination()
- wp_title() returns ‘page not found’ on page 2
- Homepage has Paged Pages that should not exist, like /page/2/ and on to /page/99999/
- Randomised Post Time
- WordPress paginate_links() function doesn’t generate properly links after apply filters
- Not refreshing content pagination on search result
- rewrite url with parameter or pagination beyond certain value does not work
- stop pretty pagination rewrite site.com/cat/2 => site.com/cat?page=2
- How checked checkboxes remember on all pages in wp_list_table pagination?
- Update to 4.4.1 breaks my pagination
- Issue on single.php pagination WordPress
- Pagination on home page not working
- How to ignore pagebreaks for RSS feed?
- Custom pagination code is not working
- Pagination doesnt show numbers
- where is wordpress search pagination
- How do I override all theme pagination throughout a site?
- Translating a pager string
- Pagination, query more pages at once
- Paginate_links only working on first page
- What is the best way to implement ajax based pagination on custom query based templates?
- Custom post type pagination like “previous current/all next”
- what code to add to search.php
- remove rel=next on category page (if
- Setting up Pagination with twentytwelve_content_nav
- GoBlog Free Pagination Issue
- Why next_posts(); function does not work inside header.php?
- Sidebar pagination posts not shown when sidebar is in single.php
- how to Adding pagination on template page wordpress
- Custom pagination search in post type with meta key
- How to add pagination to custom page
- Pagination: Last Page Missing
- posts_per_page stop working after wordpress update from 4.2.1 to 4.6.1
- Why Am I getting an error when I add the number parameter to my WP_User_Query?
- the_posts_navigation is not working
- Display NEXT and PREVIOUS pagination? [duplicate]
- Disable pagination on frontpage
- Pagination not working in custom post page
- How can I get my pagination to recognize that it is on the first page?
- pagination broken because wordpress is adding index.html
- the paged param is allways 0
- Add wp-link-pages to post
- Get next and previous page of paginated post
- Pagination 404 Not Found child page
- How to group posts by months and add pagination?
- Reverse ordered pagination on home page
- Pagination for user list
- WordPress: Getting “Newer Posts” and “Older Posts” links on a Specialized Page Template
- Get Previous/Next Post ID for Posts in Same Category
- Need help getting this page nav working correctly [closed]
- another post a page problem
- How can I remove page slug for all pagings?
- margins in between pagination links [closed]
- Page navigation not working correctly on index but only on categories
- How to split long posts in multiple pages in twentysixteen
- Duplicating pagination on second page
- Stop pagination when static homepage is set
- I want the “next” and “previous” buttons to appear in my custom navigation function
- Is ‘pm’ used by core?
- How to make infinite scroll by dividing the content?
- Change Pagination Default to “/2/” Query String “?page=2”