A simpler approach would be to store a list/array of post-ids of the posts which have been marked read by the user in his user_meta
. Then retrieve this array for every logged-in user, and run the wp_query
using the post__not_in
parameter with the array as the argument.
Related Posts:
- Exclude posts from main loop based on meta value
- Sanitize Custom Field Value in Meta Query
- Search multiple meta keys at once
- Insert/sticky specific post into Loop at specific location
- loop query exclude meta_key with meta_value
- Sort Popular Posts by Views for the Last Week
- How to iterate through database until it find a match
- Two loops by pre_get_post on same page
- Meta Query with spaces in value?
- Query posts if meta key starts with
- How do I order my loop query?
- Make blog page show 10 on first page, 9 on every other page
- Alter query using pre_get_posts() if meta_key is present
- pre_get_posts for two loops on same page
- Modify the main loop to display current month / year
- Custom loop not working
- Get author Meta for particular user inside the loop
- Can’t access PHP array inside script localization from javascript
- Change post order by meta key, per post basis
- How to get user ID’s from multiple usernames?
- Randomly display post based on meta value. (Kind of Priority/Weight)
- Generating a perfect loop
- using update_user_meta to rank users
- wpdb inside foreach loop only returns first result – 2 other similar cases found [closed]
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- Query users and count totals based on meta values
- How to get all multi-select user meta values and add them to an array?
- Attachment Metadata inside of Loop
- pre_get_posts main_query not displaying after applying tax_query filters
- Query counting excluded category on paged loop
- Get query result before posts are displayed?
- Display all existing members
- Use Loop or direct database query?
- How to use orderby on meta_value when using Pods custom database table storage
- Loop Posts Outside of WordPress Installation
- WordPress with woocommerce custom query
- Create an archive page(loop) for edd products (music files) with an audio player?
- WordPress Pages in an Array
- Loop shows post 5 times in a query
- Get featured image outside the loop using foreach
- Get Sticky User in user loop based on user role
- Popular posts with Varnish ESI
- Querying posts from only one category and exluding the latest post
- How can I make this iterative conditional within the Loop work via function?
- Posts Per Page is Not Returning Correct Number
- Infinite Loop after Genesis Theme Upgrade
- Modify widget to output posts in custom order
- Alternative layout the loop
- Why loop renders only last metabox from array? [closed]
- Cant pull in featured Image
- How to execute custom loop before loop content?
- Page gets displayed in post field
- Repeat code, change variable?
- the_content() keeps repeating itself
- Custom Looping of WordPress Posts
- Foreach loop inside foreach loop?
- Show different Google Map markers for different post_meta values
- how to place Post and page content side by side
- Show posts by tags excluding current post
- Add specific class to featured posts
- Adding options to loop
- Make custom WordPress comments list
- numberposts not responding to wp_reset_postdata()
- Echo Most Recent Sticky Post in Loop?
- Template included with plugin doesn’t return all posts for custom taxonomy
- Ajax loop and history.js for SEO
- to get a little more content after ‘read more’ inside loop
- Show all child categories associated to post ID within loop
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Remove posts_orderby filter then add it back in
- the_title() Returns the page title instead of the post
- WP search in metadata post
- Strange problem with wp_get_attachment_image_src database (db) query count
- How to include posts from one category, into a separate category of posts?
- how do i make this loop work
- How to delete only user meta value (not key) from usermeta table in wordpress?
- Active class for my flexslider in WordPress
- Foundation modal in wordpress php loop
- Link Button url count php and wordpress
- Sorting posts to make those with post thumbnail show up first
- Best way to check if a post with specific meta exists
- ACF field not appearing correctly in loop
- pre_get_posts or $where, which one to use?
- Advanced Post Display/Pagination/Ordering
- Archive sorted by month – separate
- WP update_post_meta link loop
- Update vs Insert logic but the last key is always inserted?
- WordPress loop only displays 5 articles max?
- Limit article to 100 characters. Can’t use the_excerpt…
- Next 10 posts data of currently viewing post in blog page
- Structure and Display Content from Multiple Pages on Single Page
- Creating a archive for taxonomy terms, not the term results
- Making a specific page wordpress compatable that is not index
- Return only content in excerpt field in loop
- Ajax category pagination problem
- How do I aproach this?(for sale, for lease, sold->move something from a category to another)
- Unable to login + Redirect loop on mobile
- Posts are being displayed from old to new, in ascending order
- Loop in taxonomy for terms and post
- My loop of random posts drags in comments of said random post