How to query the last 5 nodes of multiple content types? I want to query last 5 nodes of multiple content types, say, typeA, typeB, typeC, typeD.

It was originally only one content type, and I did it using EntityFieldQuery:

$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'typeA')
  -&gt;propertyCondition('status', 1)
  -&gt;propertyOrderBy('created', 'DESC')
  -&gt;range(0, 5);

$result = $query-&gt;execute();


But now I need to include 3 other content types to the list.

Is there any way to expend this query to include the last 5 nodes of the other 3 content types as well. So that the result will have 5 last nodes from all 4 content types, altogether 20 nodes.

Or should I do it with 4 individual queries?
I think the only thing you need is alter the second line of your EntityFieldQuery to this:

-&gt;entityCondition('bundle', array('typeA', 'typeB', 'typeC', 'typeD'), 'IN')


Haven't tested this particular though, but you can query multiple content types this way.

Cheers

EDIT: Maybe this can help you more: https://www.drupal.org/node/2048345