Related Posts by Author in Bricks

Looking to query posts on single posts by the author of the current post whilst excluding the current post in Bricks?

Here’s the PHP query for that to use in a Bricks query loop:


return [
‘post_type’ => ‘post’, // your post type here
‘posts_per_page’ => 100, // a large number
‘no_found_rows’ => true,
‘author’ => {author_meta:ID},
‘post__not_in’ => [ {post_id} ],
‘update_post_meta_cache’ => false,
‘update_post_term_cache’ => false,
];

view raw

gistfile1.txt

hosted with ❤ by GitHub