Is it correct to use taxonomy_term_is_page() in this code? I am trying to get some content to show up when some conditions are verified: if I am on a certain page, the content will be shown; differently, the content is blank.
Everything looks correct; I just don't know if I am not using the correct function or something else is wrong.

&lt;?php if (!taxonomy_term_is_page('18')): ?&gt;
  &lt;h5&gt;&lt;a href="home/news"&gt;blah 1 News&lt;/a&gt;&lt;/h5&gt;
&lt;?php elseif (!taxonomy_term_is_page('28')): ?&gt;
  &lt;h5&gt;&lt;a href="home/news"&gt;blah 2 News&lt;/a&gt;&lt;/h5&gt;
&lt;?php elseif (!taxonomy_term_is_page('29')): ?&gt;
  &lt;h5&gt;&lt;a href="home/news"&gt;blah 3 News&lt;/a&gt;&lt;/h5&gt;
&lt;?php elseif (!taxonomy_term_is_page('30')): ?&gt;
  &lt;h5&gt;&lt;a href="home/news"&gt;blah 4 News&lt;/a&gt;&lt;/h5&gt;
&lt;?php elseif (!taxonomy_term_is_page('81')): ?&gt;
  &lt;h5&gt;&lt;a href="home/news"&gt;blah 5 News&lt;/a&gt;&lt;/h5&gt;
&lt;?php endif; ?&gt;


This displays the results; however, when I am on one of the other terms the output doesn't change: it stays the same as the output for the taxonomy term with ID equal to 18.

My description for what I was trying to achieve has been changed; I am not trying to get anything shown based on any conditions. To put it in better words, I am trying to have the content shown; if I am on taxonomy/term/18, the content would show the else nothing would shown if I am on taxonomy/term/28 content shows and so on. It's simular to is_front_page function and you have content shown if you are on the front page, except these are taxonomy terms.
Basing on the documentation of taxonomy_term_is_page(),  the function just checks if the current page is the page of the passed-in term. Looking at the code, the function verifies the path of the current page is "taxonomy/term/%term-id", and "%term-id" is the term ID of the taxonomy term passed as argument.

function taxonomy_term_is_page($term) {
  $page_term = menu_get_object('taxonomy_term', 2);
  return (!empty($page_term) ? $page_term-&gt;tid == $term-&gt;tid : FALSE);
}


You are passing to the function the wrong parameters; you should pass it a taxonomy term object.
The code you reported is calling the function as taxonomy_term_is_page('28').

If you know the term ID for the taxonomy term, then you can use the following code:

&lt;?php
  $page_term = menu_get_object('taxonomy_term', 2);
?&gt;
&lt;?php if (!empty($page_term)): ?&gt;
  &lt;?php if ($page_term-&gt;tid != 18): ?&gt;
    &lt;h5&gt;&lt;a href="home/news"&gt;blah 1 News&lt;/a&gt;&lt;/h5&gt;
  &lt;?php elseif ($page_term-&gt;tid != 28): ?&gt;
    &lt;h5&gt;&lt;a href="home/news"&gt;blah 2 News&lt;/a&gt;&lt;/h5&gt;
  &lt;?php elseif ($page_term-&gt;tid != 29)): ?&gt;
    &lt;h5&gt;&lt;a href="home/news"&gt;blah 3 News&lt;/a&gt;&lt;/h5&gt;
  &lt;?php elseif ($page_term-&gt;tid != 30): ?&gt;
    &lt;h5&gt;&lt;a href="home/news"&gt;blah 4 News&lt;/a&gt;&lt;/h5&gt;
  &lt;?php elseif ($page_term-&gt;tid != 81): ?&gt;
    &lt;h5&gt;&lt;a href="home/news"&gt;blah 5 News&lt;/a&gt;&lt;/h5&gt;
  &lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;