Code:
print_r($wp->query_vars);
echo "<br><br>".get_query_var('term');
echo "<br><br>".get_query_var('taxonomy');
$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy') );
echo "<br><br>$term";
Output:
Array ( [titles] => windows-powershell-v2 [taxonomy] => titles [term] => windows-powershell-v2 )
windows-powershell-v2
titles
As you can see, the first three lines run fine. The fourth line fails with no error - but it terminates page execution. The specified term does indeed exist in the taxonomy; this is being reached with the URL /titles/windows-powershell-v2/.
Any idea what I'm doing wrong?