Extending WP_Query — Optimise SQL query
Here’s an idea, however it will require the ability to make custom SQL queries – with $wpdb. Since you want to get posts followed by a user, you can create a view, with the following structure: id user_id post_id post_title post_content … (all other post fields) don’t worry about duplicating posts. When you select, you … Read more