Use sessions:
<?php
session_start();
if( isset( $_POST['order'] ){
$order = filter_input( INPUT_POST, 'order', FILTER_SANITIZE_STRING );
if( $order )
$_SESSION['order'] = $order;
}
if( isset( $_SESSION['order'] )
$order = $_SESSION['order'];
Related Posts:
- Limit number of pages in pagination
- Custom taxonomy list and sortby letter pagination problem
- get_query_var(‘paged’) giving same result
- add spans and characters into paginate_links
- Next & Previous (Pagination in this case) Not Appearing
- Pagination with $_POST and $_SESSION
- Is it possible to have pagination with an offset loop?
- Frontend sorting
- 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 display pagination links for WP_User_Query?
- Random sort within an already sorted query
- Sort custom post type list table by display name of a user id stored as post meta value
- post pagination names, not numbers
- How to fix pagination after rewriting url? ie. www.site.com/players/type/pro/page/3/
- Implementing a general Table of Content across single paginated post pages
- Custom WP_Comment_Query with pagination and orderby?
- Pagination: How do I always show ‘previous’?
- Varying the number of posts per page from the first one
- Using pagination with get_posts on page type
- wp_link_page – wrap current page element
- How to create pagination on archive.php template
- Jetpack Infinite scroll conflicting with theme’s pre_get_posts custom posts_per_page
- Having issues with wordpress pagination with multiple categories
- Paginate Child Pages Content on Parent Page
- Pagination is somewhat working on frontpage, doesn’t update when “prev” is clicked
- Blocking author paging for blog entries?
- Create ONE callback for all page templates, post filter queries + paginated pages, triggering pagination via AJAX
- Get total posts found, but while using limit for pagination? get_posts
- Show post count in wordpress instead of page count in wordpress pagination
- remove paginations functions only on home
- WordPress Pagination with Get Value
- Show number of posts and number on current page (revisited)
- Rewriting get_next_posts_link() for custom loop
- Customize WordPress Core Template
- How to add a zero before numbers in WordPress Post Pagination?
- next_posts_link does not work when querying a specific category
- Tabbed content with Pagination
- Next and Previous buttons for navigation
- Offset a post in the loop, with using PageNavi Plug-in
- Last page in pagination does not match max_num_pages – the overall post count is less according to pagination
- Limiting number of visible links displayed with wp_link_pages
- category pagination got broken suddenly
- Pagination not working in custom page, only working in post page
- Only show Previous & Next button in Pagination
- Number of posts in the archive
- Pagination isn’t created when there is only one page of posts
- Different layout on second page
- Pagination Not Working When Modifying Loop Based on Post Category
- custom posts archive pagination links /page/2/ ends up in 404
- WP Query for all posts
- Yoast primary category query modification
- Pagination for Custom WP_Query not displaying page 2 results
- pagination error in taxonomy: Warning: Division by zero
- Pagination Links Not Showing Up on single.php posts on iOS Devices
- next_posts_link(); & previous_posts_link(); not working properly
- How to rearrange a pool of posts joined using two queries?
- Ending Pagination loop in PHP
- Paginate the_content automatically? [duplicate]
- pagination links not displaying
- Page navi for template page
- WordPress paginate_links function: How do i ensure the page number is not less than 1 and not greater than last
- Pagination on page 2+ only
- How to replace pagination with Next/Previous for multi page posts?
- How to Add Pagination to Page?
- Disable and redirect pagination of Home
- Can’t Add Pagination
- How to hide empty pagination button when no previous page
- Orderby event date (if it exists) or post date (if it doesn’t) – how to reorder posts based on meta value OR date
- Why pagination is not working with tax_query param?
- Pagination not working on homepage, On other pages it is working
- next and previous category name and link parent only wordpress in archive page
- WP_User_Query counter not updating with pagination
- Remove Number Of Pagination [closed]
- I would like help getting my pagination to work
- Display Both next previous and number in single page [duplicate]
- posts_per_page stop working after wordpress update from 4.2.1 to 4.6.1
- Combine WP_Query with array of custom data to single loop without breaking the pagination
- Need help on wordpress pagination script
- Update Gallery Randomly in every hour with no duplicates?
- Custom page pagination based on Kriesi pagination
- Test for if you’re on 1st page of paginated post (with nextpage quicktag)
- Pagination issue [duplicate]
- Pagination link problem when reaching the second page
- pagination broken because wordpress is adding index.html
- Add next and previous post links on pages like category, tags or archive pages
- Stop loading more posts if none left AJAX
- How to fix pagination for custom loops?
- Intercepting $_GET variable from custom pagination
- wordpress category.php query for featured news item, broken pagination and repeating posts
- Default pagination in Home/Front page
- Making a Killer wp_link_pages
- pagination leads to 404 page
- Show pagination in WP_Query
- Multiple loop with pagination in same page
- How to automatically load more data when users reaches at the bottom of the page of the wordpress site?
- Sort Posts Alphabetically Based on Specific Category (Divi)