/**
* @param $vars
* Load a view into pages and an entityQuery
*/
function yourmoduleORthemename_preprocess_page(&$variables) {
// EntityQuery blogs.
$query = \Drupal::entityQuery('node')
->condition('status', 1)
->condition('type', 'your_bundle')
// ->condition('field_some_field', 14);
// ->condition('field_some_field', ['target_id' = id]);
->sort('created', 'DESC');
$nids = $query->execute();
if (!empty($nids)) {
$nodes = Node::loadMultiple($nids);
$view_builder = \Drupal::entityTypeManager()->getViewBuilder(reset($nodes)->getEntityTypeId());
$nodes_views = $view_builder->viewMultiple($nodes, 'teaser');
}
$variables['blog'] = $nodes_views;
}