Hi,
I’ve tried following the directions of this topic thread:
It is not working for me…
This is what I’ve done so far:
- Created a grid with all post categories are selected
- The grid ID is 58
- The author ID is 6
- I have added it to a page using the element “Classic Essential Grid”
- Added the code from support thread into functions.php (updating grid and author numbers) --> see below
- The grid is showing all posts; no filtering by author.
add_filter(‘essgrid_query_caching’, ‘eg_stop_caching’, 10, 2);
add_filter(‘essgrid_get_posts’, ‘eg_mod_query’, 10, 2);// turn off caching for your grid
function eg_stop_caching($do_cache, $grid_id) {if($grid_id == 58) return false;
return true;}
function eg_mod_query($query, $grid_id){
// show only posts from specific author
if($grid_id == 58){$query[‘meta_query’] = array( ‘author’ => ‘6’, ‘orderby’ => ‘post_date’, ‘order’ => ‘ASC’ );
}
return $query;
}
What am I doing wrong?
Thanks.
Diego M.



