Last updated April 18, 2014. Created on April 18, 2014.
Edited by bhosmer. Log in to edit this page.

<?php
  $query = new EntityFieldQuery();                                                
  $entities = $query->EntityCondition('entity_type', 'node')                      
  ->entityCondition('bundle', 'your_content_type_machine_name');                             
  // We only care about terms 1 and 2                                             
  $terms = array(1, 2);                                                           
  foreach ($terms as $term) {                                                     
    $entities->fieldCondition('field_sections', 'tid', $terms);                   
  }                                                                               
  $result = $query->execute();                                                    
  $result = $entities->execute();                                                 
  $nodes = array();                                                               
  if (isset($result['node'])) {                                                   
    $nids = array_keys($result['node']);                                          
    $nodes = node_load_multiple($nids);                                           
  }                                                                               
  $items = array();                                                               
  foreach ($nodes as $node) {                                                     
    $options = array('absolute' => TRUE);                                         
    $url = url('node/' . $node->nid, $options);                                   
    $items[] = l($node->title, $url, $options);                                   
  }                                                                               
  $theme_args = array('items' => $items, 'type' => 'ul');                         
  $content = theme('item_list', $theme_args);                                     
  return $content;
?>

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.