$attributes['postsToShow'],
'post_status' => 'publish',
'order' => $attributes['order'],
'orderby' => $attributes['orderBy'],
'cat' => $categories,
'offset' => $attributes['offset'],
'post_type' => $attributes['postType'],
'ignore_sticky_posts' => 1,
)
);
$post_grid_markup = '';
/* Start the loop */
if ( $grid_query->have_posts() ) {
while ( $grid_query->have_posts() ) {
$grid_query->the_post();
/* Setup the post ID */
$post_id = get_the_ID();
/* Setup the featured image ID */
$post_thumb_id = get_post_thumbnail_id( $post_id );
/* Setup the post classes */
$post_classes = 'ab-post-grid-item';
/* Add sticky class */
if ( is_sticky( $post_id ) ) {
$post_classes .= ' sticky';
} else {
$post_classes .= null;
}
/* Join classes together */
$post_classes = join( ' ', get_post_class( $post_classes, $post_id ) );
/* Start the markup for the post */
$post_grid_markup .= sprintf(
'