You don’t have to change the markup to style the previous/next links differently:
.page-number {
/* rules that apply to page numbers */
}
.prev.page-number {
/* previous page link */
}
.next.page-number {
/* rules that only apply to the next */
}
Removing the class on the links is not needed, it can be done using basic CSS specificity rules
Here is a codepen that demonstrates styling the numbers and the prev/next links differently: https://codepen.io/tomjn/pen/XWWKbbL
Related Posts:
- paginate_links() don’t properly work in search.php?
- How to paginate the get_users function?
- Pagination adding page-numbers dots when using ‘mid_size’ => 0
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- How to style current page number (wp_link_pages)?
- Customize “the_posts_pagination” and put list instead div
- Find first image on paginated post for Pinterest
- Post Pagination Showing Same Posts Every Page
- Generating rel=prev and rel=next only on wordpress categories
- Shortcode pagination not advancing
- get_next_posts_link not working without parameter max_num_pages
- Pagination in relation to archive.php
- paginate_links() don’t properly work in search.php?
- the_posts_pagination() function returns missing page numbering on some blog pages
- Custom Query Not Paginating
- Where to call my pagination function?
- Modifying the_posts_pagination from within functions.php instead of template files
- Unable to Change “Pages:” Before WP_LINK_PAGES
- How do I make a custom “Read More Blogs” button for my blog page
- I want to customize the_posts_navigation function by replacing prev and next with images
- Shortcode with pagination advancing multiple queries
- Pagination won’t work on custom page
- Pagination not working on my archive page for a custom post type
- Display page number on custom page title function
- WordPress not showing pagination links
- Pagination in Search result
- Adding pagination to custom WordPress function
- Modifying Page-Links format
- WordPress is adding pagination for all pages not only for blog page, How to remove pagination for all pages except blog/posts page?
- Insert image between X number of posts but on specific paginated pages?
- How to change the markup WordPress inserts for post images
- When tax_query used, results disappear (0 =1 produced)
- wp_get_attachment_image returns different image size
- Limit the length of the Author Profile Biographical Text
- wp_mail not running inside Cron
- Remove product description from product archive page
- Logging in redirects to correct page but shows logged out content until forced refresh
- What is the criteria for pluggable functions?
- How can I stop a function from encoding an entity?
- Theme-Config tab in admin Pannel?
- Increment price for Woocommerce Minicart [closed]
- Change woocommerce products weight varation based its product category or tags? [closed]
- Function to “Press Update Button” on all posts
- Change WP attachment name to postid during upload only for post type
- Completely disable RSS feeds on WP 5.5.2 and show a 404 page instead of die();
- Check if row exists before inserting
- Missing argument 2 for a custom function widgets_init
- How to target only the front page (not subsequent paginated pages) in theme/plugin?
- Removing the main link to Jetpack from the menu
- Defining a global array in functions.php?
- Get the 5 lastest Featured Posts from a category
- Set quantity of woocommerce product on page visit [closed]
- get_post_type() in in_array doesn’t work for some reason
- Is it possible to change any of the HTML/URL returned from the_category()
- How to remove set_post_thumbnail_size() in child themes?
- Activate small php condition at footer over page template
- How to insert custom widget in custom sidebar in theme activation?
- How to load jQuery in the footer – nothing works for me
- how to en-queue jQuery to load before the tag
- comments_popup_link without echo?
- Can’t filter wp_get_attachment_link
- Impossible to call wordpress function inside an include?
- How to customize the_archive_title()? Cannot figure out how to change the value it produces [duplicate]
- Remove a category from a post when saving a new post
- Want to dequeue all the CSS and JS from /wp-content/uploads/xyz-folder
- Scripts not loading when using the wp_enqueue_scripts action
- is there a way to remove featured image from blog page and single page
- Include the post type before the title of search results
- Possible to merge these two functions?
- Strip div From Excerpt
- How to properly set custom logo size?
- Hide tab Buddypress profile for visitors, not logged in users
- Image Crop Not Working
- Function to check if custom page is used by page?
- How to Display WooCommerce Product Price in WooCommerce Archive
- Woocommerce Variable Product Dropdown for Custom Shop Template
- Bizarre Child Menu Issue on WP Site
- get variables data from functions.php to template wordpress (without global variables)
- how to increase connection time
- Shortcode to insert default text and change one word throughout it?
- Its my first time trying to create a website , I got an error Please help
- Drop down list code for sidebar
- Shortcode Initialization in a Custom Theme
- Hide disclaimer from summary excerpts
- Load scripts into an AJAX div
- restrict uploaded image size and fixed image display size
- Code executes outside of Loop while same code gives ‘Uninitialized string offset’ notice inside a while loop
- Function not receiving string from shortcode
- Restricted images only for logged user. (hidden url)
- Open image size links in a page instead of direct image link
- Override parent theme function that is not hooked or in the functions.php file
- Syling Custom Fields echo’s from from functions.php
- Function to get thumbnail img source
- WP Custom Comment Callback Not Responding
- Do something when user creates post (that’s pending)
- Shortcodes not outputting in correct divs
- Help finishing script to export WP user data when form submitted
- How I can show short content with short tag
- Get all users from role and add to dropdown (select) – wordpress, javascript
- WordPress enque the same script causes the setInterval not to work