Displaying a block only for nodes of a specific content type, how do I check the content type using PHP? I have a block which I would only like displayed on a KYN node. I'm currently using the option to display the block only on pages with "node/*" which worked when I only was using one node type but now that I have two (kYNs and Pages) I need to come up with a solution.

I'd like to use some PHP that returns TRUE when the content type of a node KYN.

How can I achieve this?
// Only show if $match is true
$match = FALSE;

// Which node types
$types = ['kYn'];

// Match current node type with array of types
if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1))) {
  $nid = arg(1);
  $node = node_load($nid);
  $type = $node-&gt;type;
  $match |= in_array($type, $types);
}

return $match;


source : http://drupal.org/node/115419