get taxonomy terms of parent node while in block I'm in drupal 7. Let's say I have a block on a website page.  The website page is a node that has taxonomy terms.  How do I programatically get the taxonomy terms of the website page node from my block?
You should be able to use menu_get_object() to get the node object if the block is being displayed on a node page. Then, with the $node object you can retrieve terms for the node.

if ($node = menu_get_object()) {
  $query = db_select('taxonomy_index', 'r');
  $t_alias = $query-&gt;join('taxonomy_term_data', 't', 'r.tid = t.tid');
  $v_alias = $query-&gt;join('taxonomy_vocabulary', 'v', 't.vid = v.vid');
  $query-&gt;fields( $t_alias );
  $query-&gt;condition("r.nid", $node-&gt;nid);
  $result = $query-&gt;execute();
  $terms = array();
  foreach ($result as $term) {
    $terms[$term-&gt;tid] = $term;
  }
}


Just remember that that if caching is enabled in your block it should be per-page caching, otherwise you could get unexpected results.