I think that the cookie is the best if not the only solution…
Cookie can be implemented by php or js and is your choiche to choose the right method:
Depending on:
-
the client needs (they have to work also if js is not present?),
-
the number of custom posts and site traffic (they can become a json file in a “special page” precompiled so the server can be lighter…)
PS: remember to study the right solution:
-
what if the post are less than 3?
-
what if they are not dividable by 3? (5 for example)
etc
Related Posts:
- How to get order of posts?
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Sorting: custom query with orderby meta_value_num THEN by title
- Order posts by ID in the given order
- How to order posts tag by tag?
- Loop through all tags & output posts in alphabetical list
- Woocommerce custom loop to show all the products [closed]
- Sort by meta key on archive page
- Show all parents and children in custom post type in right order
- Meta query with order by another custom field
- WP_Query Order by Specific Post ID First
- How do I sort posts with multiple pages
- Sort wordpress custom posts based on meta value
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- Understanding the orderby in WP_Query?
- Order by empty custom field
- How to order posts by title after they have already been sorted by category
- Help ordering Post loop by two meta values
- WP Query – order posts by meta field first and then order the rest
- How do I sort this custom list of sticky posts
- Filtering by multiple conditions in the loop
- WP_Query orderby random do not repeat infinite scroll – one loop
- orderby ignored by wp_query
- How to sort store location by specific category order in WP store locations
- How to sort wordpress posts already selected by WP_QUERY
- Order by value of Custom Field using url string
- WP Query with meta queries
- Order 2 meta_queries differently in WP_Query?
- How to order posts, that have already been filtered by custom taxonomy, by their category names?
- Sorting is not working in WordPress WP_Query
- Sorting: custom query with orderby meta_value_num THEN by title
- query_posts with sorting on a custom datestamp
- Order by multiple meta keys on wordpress
- Multiple WP_Query loops with Pagination
- WP_Query and next_posts_link
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- How can I save an array from a random post sequence for later use?
- In loop: posts have thumbnail AND other variables
- WP_Query sort by comment meta data
- How to order category.php loop by ‘meta_value’?
- Order posts by tags count?
- Orderby = none not working [duplicate]
- Add inline HTML to posts published within last 24hrs
- WP_query ‘orderby=none’ Problem
- Display different number of posts from one category on the different pages
- Pagination not working Search posts
- How to sort posts in admin by titles with dd.mm.yyyy format?
- Can certain (site-crashing) limitations on WP_Query in shortcode be overcome?
- WP_Query orderby breaks when using AJAX?
- Change default ordering of taxonomy terms – pre_get_terms
- Implementing an OR statement to wordpress wp_query
- WP_Query loop within WP_Query loop
- Refine search results using WP_Query
- How to pass many ids in post__in?
- How to show subcategories using loop?
- Sub-loop / nested loops Best Practices
- (Solved) WP_Query ($ args) -> How to sort letters and numbers within the same array
- Show Sticky Post at the top but do not show again in the loop?
- Any number in meta key (wp query)
- How do I run through a WordPress loop called from a filter function?
- How do I get the title of a category in a custom loop?
- WordPress Comments sort by custom meta key
- Order by summing multiple values
- Out Of memory issue on post per page parameter
- Check if loop has any categories?
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- Change query from cat id to slug or name?
- Custom WP_Query id
- Assign custom parameter to each post in query
- Loading two different AJAX requests on two different pages
- How does WP generate the default $query in WP_Query based on the URL?
- How to remove only the latest sticky post from the loop
- How I can repeat 2 HTML templates in a WordPress Query?
- Offset WP_Query by negative 1
- How to sort queried pages by an array of page ids?
- Query WP Page for Buddypress Group Home [closed]
- $post in wp_query?
- How to pass the current content of $wp_query to a new page?
- How to separate two columns from one content on a page template?
- Customize the Sorting Dropdown in WooCommerce use another list or more page
- How can I order a post query’s results based on the number of matching taxonomy terms?
- Can I alter the main loop to ‘orderby’ a custom callback?
- WooCommerce | AJAX | Product Pagination | Help me implement Ajax Pagination
- Meta query orderby meta_value_num sorting by role first
- Regarding a custom loop and output HTML tags
- Repeat array inside array through while loop
- What’s causing an infinite loop?
- pages shortcode filtering by category
- Second WP_Query loop shows data from main query
- Meta Query if Values Don’t Exist
- Get post Number with local loop and template
- Ignoring ‘a’ when sorting posts
- Combine WP_Query with array of custom data to single loop without breaking the pagination
- query_posts() doesn’t seem to be called in my page
- Next / previous posts link doesn’t show up with Posts 2 Posts
- wordpress sorting using array merge by price in ascending order but price with 0 must be show last
- Carousel Loop only duplicating
- How to show featured post first, then separate loop for other posts
- Query All Posts: Either Display Most Recent or One with Particular ACF Value Chosen