Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$query = new EntityFieldQuery();
$entities = $query->entityCondition('entity_type', 'node')
->entityCondition('bundle', array('column','blog'))
->propertyCondition('uid', $user->uid)
->propertyCondition('status', 1)
->propertyOrderBy('created', 'DESC')
->range(0, 3)
->execute();
if (!empty($entities['node'])) {
$nodes = node_load_multiple(array_keys($entities['node']));
$articles = node_view_multiple($nodes, 'magazine_teaser');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment