Drupal- check if current page is taxonomy term page

Warning message

JQuery Cycle must be installed in order to run the slideshow. Please go to Status Report for instructions.

You can use two solutions for this but avoiding the 2nd solution with arg() function is better according to Drupal docs. You should arg() function wherever possible because resulting code is hard to read.

1) Use menu_get_object function

$term = menu_get_object('taxonomy_term', 2);
if ($term) {
  // User is on a taxonomy term page

2) Use arg() function

if (arg(0) ==  "taxonomy" && arg(1) == "term" && is_numeric(arg(2)) && arg(3) == "") {
  // Taxonomy term page