Redirect (or show the node) taxonomy term page to node, if there's only one node associated with that term So I'd like to redirect taxonomy term page or show the full content of the node on taxonomy page if there's only one node associated with that term.
My solution is handle it in hook_preprocess_page(maybe there is another or better solutions but this is good too) 

put this in template.php

first solution(maybe not worked)

function YOURTEMPLATE_preprocess_page(&amp;$variables) {
  if (arg(0) == 'taxonomy' &amp;&amp; arg(1) == 'term' &amp;&amp; is_numeric(arg(2))) {
    $tid = arg(2);
    $items = taxonomy_select_nodes($tid;
    if(count($item)==1){
         drupal_goto('node/'.$items[0]-&gt;nid);
     }
    }
}


Alternative solution  

function YOURTEMPLATE_preprocess_page(&amp;$variables) {
  if (arg(0) == 'taxonomy' &amp;&amp; arg(1) == 'term' &amp;&amp; is_numeric(arg(2))) {
    $tid = arg(2);
    $items = taxonomy_select_nodes($tid);
    if(count($items)==1){

         //another solution is set a variable in preprocess and in page.tpl.php or your taxonomy tempalte page redirect it 
         $variables['soheil_redirect_tax'] = array('path' =&gt; url('node/'.$items['nid']));

    }
  }


if first solution (drupal_goto) not worked in page.tpl.php or your custom template for terms page handle redirect(I mean in page.tpl.php file or taxonomy--term.tpl.php file) with 

 if(isset($soheil_redirect_tax)){
    drupal_goto($soheil_redirect_tax['path']);
 }