Get nodes by content type when type key is not in root of nodes array I am trying to get all nodes by content type. When the key is in the root of nodes array, like [type] I can easily retrieve it by, for example:

$nodes = node_load_multiple(array(), array('type' =&gt; 'page'));


But how do I do it when the key is not in the root, like:

    [title] =&gt; Test 1
    [status] =&gt; 1
    [comment] =&gt; 0
    [promote] =&gt; 0
    [sticky] =&gt; 0
    [nid] =&gt; 24
    [type] =&gt; page
    ...
    [field_worktype] =&gt; Array
            (
                [und] =&gt; Array
                    (
                        [0] =&gt; Array
                            (
                                [value] =&gt; some_value
                            )

                    )

            )
   ...


So, in the above example, how do I get nodes which [field_worktype][und][0][value] equals "some_value"?
With an EntityFieldQuery:

$query = new \EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'node')
  -&gt;propertyCondition('type', 'page')
  -&gt;fieldCondition('field_worktype', 'value', 'foo');

$result = $query-&gt;execute();
if (!empty($result['node'])) {
  $nodes = node_load_multiple(array_keys($result['node']));
}


As an aside, the method in your OP (using the $conditions array) is deprecated in favour of EntityFieldQuery anyway, which can perform the same filters.